Vocabulary
game.loop

Inputs
tick-interval-nanosan integer
tick-delegatea Game loop delegate
draw-delegatea Game loop delegate


Outputs
loopa game-loop


Word description
Constructs a new stopped game-loop object. When started, the game loop will call the tick* method on the tick-delegate every tick-interval-nanos nanoseconds, and draw* on the draw-delegate as frequently as possible. The start-loop and stop-loop words start and stop the game loop.

The <game-loop> word provides a shorthand for initializing a game loop that uses the same object for the tick-delegate and draw-delegate.

See also
<game-loop>

Definition


: <game-loop*>
( tick-interval-nanos tick-delegate draw-delegate -- loop )
f 0 0 f f f game-loop boa ;