The smallest possible game. createGame takes where to draw and what the window is (width, height and background), and the second call takes the game's scenes, keyed by name. With none, the loop still runs and the canvas is cleared every frame: that is all this example does, and it is the base of every other one.
All examples · Sprites and 2D