CodeIt guide

Make a small browser game you can actually read

How to build a browser game you can share as a link and understand the code of, plain JavaScript, KAPLAY (formerly Kaboom.js), Phaser and p5.js compared.

Short answer: if you want a game that runs at a link and whose code you can understand and change, build it in plain HTML, CSS and JavaScript, or with a small library like KAPLAY, Phaser or p5.js. If instead the goal is a game your friends will actually play, Roblox wins on distribution and nothing else is close. Those are two different goals and it is worth deciding which one you have before you start.

This page is about the first goal: a small game, running in a browser, made of code you can open and read. It also covers what happened to Kaboom.js, because a lot of tutorials still use a name that no longer exists.

Decide which goal you have

RouteLanguageRuns in a browser?Share as a link?Can a beginner read the code?
Plain HTML/CSS/JSJavaScriptYesYesYes. This is the point
KAPLAY / Phaser / p5.jsJavaScriptYesYesYes, with a bit of library learning
ScratchBlocksYesYes, on ScratchThere is no text code to read
RobloxLuaNo, needs the Roblox appOnly inside RobloxPartly, but the platform is most of the work
UnityC#Web export exists, awkwardSometimesNot early on
GodotGDScriptWeb export existsSometimesSomewhat, after a big download
pygamePythonNoNoYes, but nobody can play it

Two rows deserve a straight answer.

pygame is a common recommendation for kids learning Python, and the code really is readable. But it does not run in a browser, so there is no link to send. The player has to install Python and run a file. For a 12-year-old whose motivation is showing friends, that is usually where the project dies.

Roblox is the opposite trade. The code is Lua, the tooling is heavy, and a beginner spends more time on the platform's systems than on programming. But it is where the players are. If the sentence in your head is "I want people to play my game," Roblox is the honest answer and this page is not. If the sentence is "I want to understand how a game works," keep reading.

The plain JavaScript route

You can build a real game with no library at all. A web page can already draw shapes, respond to key presses and run a loop many times a second. That is a game engine in miniature, in about thirty lines.

Every browser game has the same three parts:

  1. State: variables holding where things are and what the score is.
  2. A loop: a function that runs roughly 60 times a second, updates the state, and redraws.
  3. Input: event listeners for keys, clicks or taps that change the state.

Games that work well with no library: Pong, Snake, a clicker, Breakout, a memory game, a quiz, a simple maze. Games that do not: anything with many animated sprites, physics or scrolling levels. That is where a library earns its place.

Start with no library anyway. Understanding the loop is what makes every later tool make sense.

Kaboom.js is now KAPLAY, and tutorials have not caught up

If you search for a beginner JavaScript game library, you will find a lot of writing about Kaboom.js. That name is retired.

Kaboom.js was built at Replit. After Replit stopped developing it, the community took the project over, but Replit kept the original repository and the "Kaboom" trademark, so the community version was renamed. It now lives at kaplayjs.com and github.com/kaplayjs/kaplay, and is community-maintained and open source.

The practical upshot for anyone following an old tutorial: the code mostly still works. KAPLAY was built as a drop-in successor, so in most cases you change the import or script tag to point at KAPLAY and the rest of the tutorial's code is unchanged. If a tutorial's example fails, check the library reference first. The name is usually the problem, not your typing.

The three libraries worth knowing

LibraryBest forLearning costNotes
KAPLAYArcade and platform games, sprites, collisionsLowThe former Kaboom.js. Has an online playground. Friendliest of the three for a first sprite game.
PhaserBigger, more serious 2D gamesMediumThe most established. Far more tutorials and Stack Overflow answers, which matters when stuck. Heavier to start.
p5.jsVisual, creative, generative work; simple gamesLowNot a game library, a creative coding library. Excellent if the interest is drawing, animation and art as much as games. Strong beginner documentation.

A reasonable order: plain JavaScript first, then KAPLAY or p5.js depending on whether the interest is arcade games or visual art, then Phaser if the projects outgrow it.

What to build first

Something too small. The most common failure is a first project scoped like a commercial game, which stalls in week two and ends the interest.

A good first browser game has one mechanic, one screen, no levels, no saving and no menu. Snake, Pong or a clicker teaches the loop, input handling and collision detection, most of what any 2D game is. Add a second thing only after the first works.

Where a browser game can be shared

A browser game is a website, so everything on the publishing side applies. Any static host will serve it: Neocities, GitHub Pages (13+ to hold an account), Netlify.

itch.io is the natural home for games specifically, and it accepts HTML5 uploads as a zip. Note its terms carefully before assuming a child can use it: players must be 13 or older, and publishers must be 18 or older, or have parental or guardian consent. For a young creator that means a parent is involved by design, not by accident.


Disclosure: we make a tool in this space

We build CodeIt (codeitlearn.com), a browser-based studio where a learner describes a website, game or quiz and gets a working version they can play. They change it by moving things on the page, picking colours and fonts, or asking for what they want. A tab then shows what the project is made of and opens the lesson behind each idea it used. The project stays open and changeable rather than locked. The loop is: make something, play it, change it, see what it is made of, and publish it. Free tier: a monthly allowance of assisted project builds, two learner profiles with parent view, free now, no card required. Built for ages 8 to 14, with parent-managed, email-verified profiles for 5-12 and independent accounts from 13.

Who this is not for. Games here are browser games in HTML, CSS and JavaScript. We do not do Unity, Godot, Roblox Lua or pygame, there is no multiplayer, no mobile app export, and no route to an app store, if any of those is the goal, use the tool built for it. We also have no web curriculum: there are 31 beginner Python lessons, but the web side is the builder itself, not a course. And note that managed under-13 profiles cannot publish publicly, so if the goal is a link a young child can send around, a parent-owned itch.io or Neocities account is the more direct route.


Common questions

Is Kaboom.js dead? The name is retired. The project continues as KAPLAY at kaplayjs.com, community-maintained. Old Kaboom tutorials usually work after changing the import.

Should a beginner use a game engine like Unity or Godot? Not for a first game. Both are downloads with large interfaces, and a beginner spends the first weeks on the editor rather than on programming. Browser games skip that entirely.

Is Scratch a waste of time before this? No. Scratch teaches loops, conditionals, events and variables properly. The reason to move on is wanting to read and write text code, not that Scratch was wrong.

Can I make a multiplayer game this way? Not easily. Multiplayer needs a server, which is a substantially harder project. Build several single-player games first.

JavaScript or Python for game programming? JavaScript, if the game needs to run at a link. Python is a fine first language, but pygame games cannot be shared as a URL.

Last verified: 23 August 2026.

Questions parents ask first

Is Kaboom.js dead?

The name is retired. The project continues as KAPLAY at kaplayjs.com, community-maintained. Old Kaboom tutorials usually work after changing the import.

Should a beginner use a game engine like Unity or Godot?

Not for a first game. Both are downloads with large interfaces, and a beginner spends the first weeks on the editor rather than on programming. Browser games skip that entirely.

Is Scratch a waste of time before this?

No. Scratch teaches loops, conditionals, events and variables properly. The reason to move on is wanting to read and write text code, not that Scratch was wrong.

Can I make a multiplayer game this way?

Not easily. Multiplayer needs a server, which is a substantially harder project. Build several single-player games first.

JavaScript or Python for game programming?

JavaScript, if the game needs to run at a link. Python is a fine first language, but pygame games cannot be shared as a URL.

What you can do on CodeIt

Last verified 2026-08-23.