Module manages whole game.
Module methods
Game.fpsGame.fps=(fps)-
Set/Get FPS (frames per second) limit. Default value is 30.
Game.real_fps-
Get actual FPS.
Game.screen-
Get final output(
Texture) of the game screen.The screen is NOT cleared automatically at the beginning of the game loop, so you should clear it by Texture#clear method.
Game.screen.clear Game.run(width, height, options = {}) { ... }-
Starts the game. Executes passed block each frame.
Resolution of the game screen set by
widthandheight.You have to pass. Keys and values below can be selected.Hashas optionsKey Value Default :cursorWhether to show a cursor or not (Since Ver. 0.1.16) false:fullscreenFullscreen or not (Since Ver. 0.1.12) false:window_scaleScale of the window.It will keep the resolution of the gamescreen. 1 Game.running?-
If the game is running return
trueotherwise returnfalse. Game.terminate-
Terminate the game.
Game.ticks-
Get the number of milliseconds since the program began.
(Not translated yet:) 実装の都合上、 49 日程度でオーバーフローし、 0 に戻ります。
Game.titleGame.title=(title)-
Set/Get the game title.