Previous: Window Creation, Up: Booting [Contents][Index]
This hook is run every time the game loop wants to render. Procedures
added to this hook should accept two arguments: dt
, the time in
seconds since the last render call; and alpha
, a number in the
range [0,1] that indicates how far in between two discrete updates of
the game state the loop is in. The alpha
value is important
for smoothing animated values to avoid the “temporal aliasing”
effect that causes choppy looking animations.
This hook is run every time the game loop catches an error. Procedures added to this hook should accept no arguments.
Start the game loop. frame-rate
specifies the optimal number
of frames to draw per second. tick-rate
specifies the optimal
game logic updates per second. Both frame-rate
and
tick-rate
are 60 by default. max-ticks-per-frame
is the
maximum number of times the game loop will update game state in a
single frame. When this upper bound is reached due to poor
performance, the game will start to slow down instead of becoming
completely unresponsive and possibly crashing.
Abort the game loop.