Crate puppetmaster

Source
Expand description

§Puppetmaster

Easy-to-use input handling for writing games.

This crate exposes different kinds of input handlers. Pick which one to use based on how your game engine provides you with input data.

§Inputs vs Controls

This crate makes a distinction between inputs and controls. Inputs are the raw keycodes your game engine feeds to you; controls are what your game does about it.

So, something like Key::W would be an input, predefined by your game engine, and you could map it to a Control::Up you defined in your game’s code.

Multiple inputs can map to the same control, but not vice versa. So, both the W key and the up arrow could map to Control::Up, but you couldn’t have the shift key map to both Crouch and Sprint.

Structs§

EventInputHandler
Input handler for an event-based game engine.
PollingInputHandler
Input handler for an polling-based game engine.
QueryInputHandler
Input handler for an query-based game engine.