Making Browser Games


projects personal

I’ve ended up building a small collection of browser games over the past while, all following the same rule: single HTML file, no dependencies, no build step, no frameworks. Canvas 2D for rendering, the Web Audio API for sound, vanilla JavaScript for everything else. Open the file, it runs.

The appeal is partly nostalgia. These are mostly takes on games I grew up playing, rebuilt from scratch to understand how they actually work under the hood. Each one taught me something different.

ABYSS is the biggest one, a Doom style raycasting FPS. Getting the raycasting engine working was the real challenge: cast a ray per vertical screen strip, find where it hits a wall, scale that strip’s height by distance. Simple math that adds up to a convincing pseudo-3D space. It has a full weapon set, several enemy types, and a save system.

Cave Crusher is a Dig Dug style game: tunnel through dirt, get chased by enemies through the tunnels you’ve dug. The interesting part was the tunnel carving itself, tracking which grid cells have been dug out and making sure enemy pathing respects it.

Star Squadron is a Galaga style vertical shooter. Enemy formations, wave patterns, that specific rhythm of dodge-and-shoot that these games rely on.

Balloon Siege is a tower defense game built around popping waves of balloons before they reach the end of the path. Mostly an exercise in wave spawning and simple pathfinding.

Ricochet is a paddle and ball game in the Breakout and Pong family. Deceptively simple to build and surprisingly fiddly to get the physics feeling right.

Midnight Blackjack and Maison Roulette round it out. Card shuffling and dealing logic for one, a spinning wheel and betting system for the other. Neither needed a game loop the way the others did, which made for a nice change of pace.

None of these are trying to be polished commercial products. They’re small, self-contained, and built to actually finish rather than sit half-done in a folder somewhere. That’s most of the appeal.

© 2026 Ian Knight