New to TypeSprite?:

This is the class that runs when you configure your game in typesprite.config.mjs using run: {...}. It is also used when there is no typesprite.config at all.

In most cases one won't need to worry about this class.

The details:

This is a facade that performs all steps required to config the engine and run a game. The config is defined by a GameRunnerConfig and provides a lot of options.

For advanced devs:

Internally it is a wrapper around WorldManagerBuilder and a mainloop-handler. It's totally fine to not use GameRunner and setup your game without it. In that case the source-code of this class can help to understand how the things are working.

If you run the dev server (using typesprite dev) not use a custom main-entry-file than it's possible to visit http://localhost:5001/inspect-game.js. It shows how the GameRunner is configured by the dev-server.


  • GameRunnerConfig
  • WorldManager
  • WorldManagerBuilder


  • GameRunner




_frameRequest: number = 0
bluredMaxFps: number = 0
engineContext: EngineContext = null
frame: number = 0
quit: boolean = false
starter: WorldStarter
worldManager: WorldManager


Generated using TypeDoc