allow returning nil from enter-state, on-event
change on-call to return a [stmid value] rather than an arbitrary stm, too much weird shit can go wrong
function to remove a state machine's code
starting to build helper macros for defining state machines
- rename "game-state" to "screen" (like "title screen", "options screen", etc)
- rename :state to :id
- provide helpers to load a screen given a "spec", deserialize a screen back to a spec, manage a screen stack
- rework test repl helper to allow setting the screen directly, instead of tweaking game state
- have start-game take a spec by default
- always include the id as an attribute
- implement query operators that return the whole entity, rather than just the ids
- implement update / delete functions which extract the id from the given entity
Input events are now represented as maps containing the complete current state of the user's input devices.
The update method is called with a timeline of all input events since the last call to update.
This neatly solves the "stuck key" problem by making state transitions implicit.
It also solves the problem of different game states (ie. in-game and paused with menu) dealing with input differently.
If part of a game cares about keeping track of all of its input history, and part doesn't, they don't have to fight or know about each other.