A library with a small scaffolding for creating simple games.
Create a game.
This follows the State Machine program architecture. We must provide:
s of possible program states,e of possible custom events,init : s,update : GameEvent e -> s -> s, andview : s -> Screen eThis framework comes with some built-in events. Specifically,
GameEvent can be a ClockTick event, a Keyboard event,
or it can be a Custom event with type e.
The number of milliseconds since Midnight UTC Jan 1 1970.
Note: You can tell how much time has elapsed in your game by saving the start time in your game state and then subtracting later on.
Events that your game can respond to.
A ClockTick event occurs about 60 times per second and carries the
current timestamp.
A Keyboard event occurs whenever a key is pushed down or released
(see Lib.Keyboard).
A Custom event can be triggered by the onClick property of a
Graphic element (see Lib.Graphics).
A simple game, with state type
sand event typee.