Module core.game

T-Engine game API

Functions

exit_engine () Tell the C core to quit.
getTime () Returns the SDL time.
reboot () Reboot the Lua environment.
setFPS (fps) Set the display's frames-per-second rate.
setRealTime (fps) Set the game's frames-per-second rate.
set_current_game (game) Sets the current game.
sleep (ms) Put the engine to sleep.


Functions

exit_engine ()
Tell the C core to quit.
getTime ()
Returns the SDL time.

Return value:

The SDL time.
reboot ()
Reboot the Lua environment.
setFPS (fps)
Set the display's frames-per-second rate.

Parameters

  • fps: The frames-per-second.
setRealTime (fps)
Set the game's frames-per-second rate.

Parameters

  • fps: The frames-per-second.
set_current_game (game)
Sets the current game. This allows the Lua code to be notified to tick, display and handle quitting.

Parameters

  • game: The Lua game object.
sleep (ms)
Put the engine to sleep.

Parameters

  • ms: The number of milliseconds to sleep for.

Valid XHTML 1.0!