Vocabulary
game.loop

Inputs
tick-interval-nanosan integer
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 delegate every tick-interval-nanos nanoseconds, and draw* on the same delegate object as frequently as possible. The start-loop and stop-loop words start and stop the game loop.

To initialize the game loop with separate tick and draw delegates, use <game-loop*>.

See also
<game-loop*>

Definition


: <game-loop> ( tick-interval-nanos delegate -- loop )
dup <game-loop*> ; inline