FPS: . Move with arrows, shoot with space. Select with Return.

Game states

Minimalistic example using all jaws convenience methods and game states. Game states are an proven and robust way of separating various parts of the game. For example: An intro, a menu, the actual game play, the high score list. That's 4 different game states right there.

A gamestate is just an normal javascript object with the methods setup(), update() and draw(). In this example we make 2 Constructors: PlayState() and MenuState().
We switch active game state with: jaws.switchGameState(a_game_state_or_function)

jaws log