From c2373a75d763ed6f2d1c684564dc2ad2348bdc79 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 21 Sep 2021 20:08:17 -0400 Subject: game-loop: Add init argument to run-game*. --- doc/api.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api.texi b/doc/api.texi index 3946ecd..63b3d9d 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -332,7 +332,7 @@ make a terminal roguelike game instead? Chickadee doesn't come with a terminal rendering engine, but the developer could write one without having to write their own core game loop. -@deffn {Procedure} run-game* [#:update] [#:render] [#:time] [#:error] @ +@deffn {Procedure} run-game* [#:init] [#:update] [#:render] [#:time] [#:error] @ [#:update-hz 60] Start the game loop. This procedure will not return until @@ -343,6 +343,9 @@ to operate: @itemize @item +@var{init}: Called just before game loop is started. Use it to +perform game initialization. +@item @var{update}: Called @var{update-hz} times per second to advance the game simulation. This procedure is called with a single argument: The amount of time that has passed since the last update, in milliseconds. -- cgit v1.2.3