Game worlds

The game.worlds vocabulary provides a world subclass that integrates with game.loop and optionally game.input and audio.engine to quickly provide game infrastructure.


Subclasses of game-world can provide their own setup, teardown, and update code by providing methods for these generic words:
begin-game-world ( world -- )

end-game-world ( world -- )

tick-game-world ( world -- )

The standard world generics draw-world* and resize-world can also be given methods to draw the window contents and handle resize events. The draw-world* method will be invoked in a tight loop by the game loop to update the screen.