Crate gate[][src]

Gate is a game development library tailored to 2D pixel-art games.

When creating a game, it is good practice to make a layer, specific to one's needs, that separates the game logic from the resource management, rendering, audio, and other interfacing that is needed for a game. "Gate" is the layer that I created for this purpose with my personal game development endeavors, and I decided to make it public. It should be noted that this library was developed for my own personal needs, and is not meant to be a general purpose game development library. This manifests itself mostly with the renderer, which is made specifically for 2D pixel art. If your game has similar needs or you just want to get something going quickly, then this library is for you. If you have slightly different needs, then you can still use this code as a reference point.

Users of this crate should create a build script in their project, invoking functionality from the sibling crate "gate_build". This will generate texture atlases and enums to reference assets. See the "gate_build" crate for more details.

Example usage

For a full example, see https://github.com/SergiusIW/gate/tree/master/example.

Future changes

There are a number of new features I am planning to add to Gate in the future. Some of these will involve breaking changes.

Modules

asset_id

Traits related to asset enums that are generated by "gate_build".

renderer

Contains structs relating to application rendering.

Macros

gate_header

Macro to be placed in the main.rs file for a Gate app.

Structs

AppContext

Context passed to methods in App.

AppInfo

A struct for specifying initialization information for running an App.

Audio

Struct for audio playback.

Enums

KeyCode

Enum for keyboard keys and mouse buttons.

Traits

App

Trait that a user can implement to specify application behavior, passed into gate::run(...).

Functions

run

Invoke this in a main method to run the App.