Browser arcade game (HTML canvas)
A complete small game loop: input, movement, collisions, score, and restart. No engine needed.
Make a browser game using plain JavaScript and the HTML canvas: [GAME IDEA, e.g. 'dodge falling asteroids']. - Fixed-timestep game loop with requestAnimationFrame, so speed doesn't depend on frame rate. - Keyboard and touch controls; pause on P and when the tab is hidden. - Collision detection, score, increasing difficulty, game over + restart. - High score saved in localStorage. - Scales to any screen while keeping aspect ratio; crisp on high-DPI displays. - Simple sound effects with the Web Audio API, muted by default with a toggle. Keep it in one HTML file under 500 lines first; split into modules after it's fun.
Tips
- Iterate on 'feel' with small prompts: 'make the jump snappier', 'add screen shake on hit'.
Works with: Cursor, Claude Code, Codex, Replit, Lovable, Bolt, v0. Last reviewed 2026-11-13.