game-loop


Vocabulary
game.loop

Class description
Objects of the game-loop class manage game loops. See Game loops for an overview of the game loop library. To construct a game loop, use <game-loop>. To start and stop a game loop, use the start-loop and stop-loop words.

The tick-delegate and draw-delegate slots of a game loop object determine where the loop sends its tick* and draw* events. These slots can be changed while the game loop is running.

Definition


TUPLE: game-loop
{ tick-interval-nanos integer read-only initial: 0 }
tick-delegate draw-delegate
{ running? boolean initial: f } { tick# integer initial: 0 }
{ frame# integer initial: 0 } tick-timer draw-timer
benchmark-data ;


Methods