01
Plain JavaScript and HTML: best for text-first browser games that need to load instantly
Platform: Any browser · free · no build step required
A large share of the genre's classics are hand-written HTML, CSS and JavaScript with no engine at all. A Dark Room is open source on GitHub under MPL-2.0, Trimps publishes its source under GPL-2.0, and Kittens Game keeps its code in a public repository. Reading any of them shows the whole pattern: a state object, a loop that adds production times elapsed time, buttons that check a cost, and a save written to localStorage.
Pick this when your game is buttons, numbers and text. You get instant load times, free hosting on GitHub Pages or itch.io, and nothing to learn beyond the browser. Our JavaScript incremental game tutorial walks through the pieces with these games as references.
Watch out for: Browsers slow timers in background tabs, so a setInterval loop that counts ticks will undercount. Measure real elapsed time from Date.now() on every tick instead.
