By the end of this lesson you will have a playable 2D game, built in five prompts, where each prompt makes one change you can check before you ask for the next one.
You need: the brief from the last lesson, and a folder on your computer · Time: 9 minutes
A canvas is the drawing area that a web page gives you. You put one line in the page, and from then on the code can draw rectangles, circles, text and images inside that area. Everything in a 2D browser game is drawn on a canvas, or on something built on top of one.
You have four common choices for what draws your game:
What you use What it gives you When it is the right choice The plain canvas Drawing, and nothing else. You write the loop and the rules yourself, with the agent A first game with one screen and one mechanic Phaser A complete 2D game framework with scenes, sprites and physics built in When the game grows past one screen KAPLAY A friendlier game library with fewer ideas to learn A middle ground between the two PixiJS A fast drawing engine, but not a game framework When you already know what you are building Phaser's current major version is 4, with 4.2.1 as the latest release, and KAPLAY's current stable line is 3001. Those numbers were checked on 20 November 2026, and they will change, so ask your agent for the current version instead of copying a number from any tutorial.
Why?Starting on the plain canvas is not the beginner option. It is the option that keeps the whole game in two files you can read, and it teaches the loop properly. Libraries hide the loop, and hiding it is the last thing you need on day one.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Five steps, five checks
- Step one: draw the empty screen
- The same prompt shape, five times
- When the screen stays empty
- Recap