Make Your First Web Game with Claude Code
Set up Claude Code, turn a small idea into a browser-game brief, and work toward a playable HTML file you can publish.

Set up Claude Code and the canvas
The Claude Code quickstart lists an open terminal, a code project to work in, and a Claude subscription, Claude Console account, or supported cloud access as starting requirements.[11]
On macOS, Linux, or WSL, the quickstart installs the CLI with the native command below. The docs note that the installer shows no progress while it downloads.[11]
curl -fsSL https://claude.ai/install.sh | bashThe docs confirm a working install by printing a version number.[11]
claude --versionThe start command opens the interactive session from a project directory. First use prompts a browser login, and credentials are stored after that.[11]
claudeMDN describes <canvas> as an HTML element for drawing 2D graphics with JavaScript. The default canvas is 300 pixels by 150 pixels, and custom sizes use the width and height properties. The Canvas tutorial says you need a basic understanding of HTML and JavaScript, and the Breakout tutorial builds collision detection, controls, and win and lose states in pure JavaScript.[12, 13]
Write a brief and choose a reference
X user @ridark_eth says a SPEC.md and the /model fable-5 command in Claude Code put a playable HTML5 build in the project folder. The quickstart's prompting advice asks for step-by-step instructions when a task has several parts.[3, 11]
/model fable-5
X user @MengTo says a strong reference, the live URL of a game, and its source repository give a coding agent mechanics to study and recreate in a working project. MDN's Breakout tutorial lists the mechanics a first browser game needs, including canvas manipulation, rendering, moving images, collision detection, controls, animations, and win and lose states.[2, 13]
X user @majidmanzarpour says a game director skill system for Codex and Claude Code guides gameplay loops, graphics, HUD and UI, debugging, and QA, with optional 3D, image, and audio assets through API keys. Claude Code's docs point to skills as one way to extend the agent.[1, 11]

Keep the first build small
MDN's Breakout tutorial keeps one canvas, a ball, a paddle, bricks, score, and lives in scope. X user @argofowl says knock it off is a single HTML file with no 3D models and everything built in code. The author says it was generated in 1h20m, with the player as a cat at 3am knocking objects off a desk without waking the human.[6, 13]

X user @maxt3chno says Fable 5.2 handled the yacht physics, simulator mechanics, and logic for a Three.js yacht simulator built with zero 3D models. The quickstart shows Claude Code handling code changes and Git operations in the same project.[10, 11]

Watch for install, input, and fun problems
The quickstart says a missing command usually means the install directory is not on PATH. The docs also separate PowerShell and CMD errors. A token '&&' error means PowerShell, while an unrecognized irm means CMD.[11]
X user @coolerwave says the worst bug in an Apple Watch duck game was the trigger. The pointer for the Mac combined an Apple Watch, an iPhone app, and a Mac menu bar app; the watch reads gravity and rotation and sends pointing data, and the author says Claude Opus 5.5 helped write it. MDN's Breakout tutorial includes control mechanisms.[5, 13]
X user @simonw says making something that looks like a game is easy now, while making a game that is fun to play remains beyond the author and beyond Claude and GPT-5.6. The quickstart's bug-fix advice asks for a specific description of the problem, such as a login bug where users see a blank screen after entering wrong credentials.[4, 11]
What developers shipped
A leaderboard and a database for progress came after Claude Fable 5.2 wrote the game, according to X user @sachinkmohan. The author says the project started with zero game-development experience, and Claude Code's quickstart covers adding features to an existing project.[7, 11]

STAR SLING came from a wish by X user @Asteri_eth to keep the feeling before an Angry Birds bird moves. The author describes pulling back the slingshot, reading the arc, and expecting the tower to fall. The game was built with Codex for the browser, and MDN's Breakout tutorial includes control mechanisms and win and lose states.[8, 13]

Soft Spot is a squishy toy game from X user @comster, built with Claude Opus 5.5 and three.js. Five squishies each break in their own way, and releasing a squeeze a split second before the burst yields an ultra rare. The author frames it as day 46 of making a game every day until 100 players, and Claude Code's quickstart lists feature work as a common task.[9, 11]
Host a page with GitHub Pages
GitHub Pages publishes a user site at username.github.io, and the quickstart creates the repository with that name.[14]
In the repository settings, the quickstart sets the publishing source to Deploy from a branch and selects a publishing branch. The docs say a change can take up to 10 minutes to appear after a push.[14]
Deploy from a branchThe quickstart puts page content in README.md, and sets the site title and description in _config.yml.[14]
Developers' methods are paraphrased from their public posts on X and credited to each author; setup steps follow the official documentation. Indexed 2026-11-14. Interfaces may have changed since; the official documentation takes precedence.
Sources
- @majidmanzarpour · 2026-06-14Xindexed 2026-11-14
- @MengTo · 2026-07-29Xindexed 2026-11-14
- @ridark_eth · 2026-09-14Xindexed 2026-11-14
- @simonw · 2026-08-09Xindexed 2026-11-14
- @coolerwave · 2026-11-09Xindexed 2026-11-14
- @argofowl · 2026-11-13Xindexed 2026-11-14
- @sachinkmohan · 2026-11-12Xindexed 2026-11-14
- @Asteri_eth · 2026-08-11Xindexed 2026-11-14
- @comster · 2026-11-13Xindexed 2026-11-14
- @maxt3chno · 2026-11-13Xindexed 2026-11-14
- docs.claude.com/en/docs/claude-code/quickstartindexed 2026-11-14
- developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorialindexed 2026-11-14
- developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScriptindexed 2026-11-14
- docs.github.com/en/pages/quickstartindexed 2026-11-14
