Build your own Browser Game
A classic arcade game (Snake or Breakout) in plain JavaScript: a game loop, input, collisions, a score and an accessible pause.
- Intro
- About 4–10 h
- 4 checkpoints
- 3 tutorials · JavaScript, Python
Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.
Choose a tutorialWhy build it
A game is a friendly way to practise the DOM, events and timing: every bug is visible, and the game loop teaches requestAnimationFrame and state updates.
You will be able to
- Run a game loop with requestAnimationFrame and a fixed time step.
- Handle keyboard and touch input.
- Keep game state separate from drawing and detect collisions.
- Support pausing, keyboard-only play and reduced motion.
Skills it exercises
Recommended on Frontend Engineer.
How you know you are there
Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.
- Checkpoint 1Self-check
Loop
Done when: The game draws at a steady frame rate and pauses when the tab is hidden.
- Checkpoint 2Self-check
Input
Done when: Arrow keys, and swipes on a touch screen, move the player smoothly.
- Checkpoint 3Self-check
Rules
Done when: Collisions, scoring and game over work, and the high score survives a reload.
- Checkpoint 4Self-check
Polish and accessibility
Done when: Space pauses, a start screen explains the controls, and animation is reduced when prefers-reduced-motion is set.
Stretch goals
- Sound effects with the Web Audio API.
- Installable offline play as a PWA.
Step-by-step guides
Pick one in a language you know (tutorial languages: JavaScript, Python). They open on the author’s site.
- JavaScript
Think like a programmer: How to build Snake using only JavaScript, HTML & CSS(external site)
Snake with JavaScript, HTML and CSS only.
- JavaScript
2D breakout game using Phaser(external site)
MDN: Breakout with the Phaser framework in 16 short lessons.
- Python
Roguelike Tutorial Revised(external site)
Python alternative: a full roguelike, for learners on the Python tracks.
Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.
Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.