game-world
Game worlds

Next:game-attributes


Vocabulary
game.worlds

Class description
A subclass of world that automatically sets up and manages connections to the game.loop, game.input, and audio.engine libraries. It does this by providing methods on begin-world, end-world, and draw*. Subclasses can provide their own world setup, teardown, and update code by adding methods to the begin-game-world and end-game-world generic words. 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.

The game-world tuple has the following publicly accessible slots:
game-loop contains the game-loop instance managed by the game world. If the world is inactive, this slot will contain f.
audio-engine contains the audio-engine instance managed by the game world. If the world is inactive, or the use-audio-engine? slot of the game-attributes object used to initialize the world was false, this slot will contain f.


See also
begin-game-world, end-game-world, tick-game-world

Definition


TUPLE: game-world < world
game-loop audio-engine
{ tick-interval-nanos integer initial: 0 }
{ use-game-input? boolean initial: f }
{ use-audio-engine? boolean initial: f } audio-engine-device
{ audio-engine-voice-count initial: 16 }
{ tick-slice float initial: 0.0 } ;


Methods