<game-loop> ( tick-interval-nanos delegate -- loop )
Game loops

Prev:Game loop delegate
Next:<game-loop*> ( tick-interval-nanos tick-delegate draw-delegate -- loop )


Vocabulary
game.loop

Inputs and outputs
tick-interval-nanosan integer
delegatea Game loop delegate
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