Handbook
Glossary
start-loop ( loop -- )
Game loops
Prev:
<game-loop*> ( tick-interval-nanos tick-delegate draw-delegate -- loop )
Next:
stop-loop ( loop -- )
Vocabulary
game
.
loop
Inputs
loop
a
game-loop
Outputs
None
Word description
Starts running a
game-loop
.
See also
stop-loop
Definition
USING:
accessors
calendar
kernel
timers
;
IN:
game.loop
:
start-loop
( loop -- )
t
>>running?
dup
[
[
tick-iteration
]
curry
f
]
[
tick-interval-nanos>>
nanoseconds
]
bi
<timer>
>>tick-timer
dup
[
frame-iteration
]
curry
f
1
milliseconds
<timer>
>>draw-timer
[
tick-timer>>
]
[
draw-timer>>
]
bi
[
start-timer
]
bi@
;