FREE & OPEN SOURCE
HTML5 Games
Free Snake Game — HTML5 Single File, No Ads
SnakeZip: the classic snake on a crisp canvas — speeds up as you eat, swipe controls, best score. One file, embed it anywhere.
What it is
SnakeZip is the timeless snake game on a clean HTML5 canvas: eat the food, grow longer, don't hit the walls or yourself. Every five foods the game speeds up a notch, so runs get tense fast. The snake body fades toward the tail, food pulses red, and everything is drawn with rounded rects for a modern feel.
Controls are complete: arrow keys, WASD, swipe gestures on touch, and space to pause. Reversing into yourself is blocked (the classic instant-death misclick). Best score persists in localStorage.
One file, ~160 lines, no dependencies, no ads, no tracking. Host it, embed it in an iframe, or run it from a USB stick.
Controls are complete: arrow keys, WASD, swipe gestures on touch, and space to pause. Reversing into yourself is blocked (the classic instant-death misclick). Best score persists in localStorage.
One file, ~160 lines, no dependencies, no ads, no tracking. Host it, embed it in an iframe, or run it from a USB stick.
Server requirements & dependencies
- Any modern browser — that's the whole list
- Any static file host to publish it (or none: the file works from disk)
- To embed on a site: a plain <iframe> pointing at the file
- No server, no database, no build step, no dependencies, no network calls
How to install
1. Unzip. You get one file: index.html.
2. Put it anywhere — a folder on your website, GitHub Pages, Netlify, a USB stick — or just double-click it and play locally.
3. To embed it on an existing page: <iframe src="/snakezip/index.html" style="width:100%;height:800px;border:0"></iframe>
Best scores save automatically in the browser's localStorage.
2. Put it anywhere — a folder on your website, GitHub Pages, Netlify, a USB stick — or just double-click it and play locally.
3. To embed it on an existing page: <iframe src="/snakezip/index.html" style="width:100%;height:800px;border:0"></iframe>
Best scores save automatically in the browser's localStorage.
The prompt — build it yourself
Paste this into Claude and you'll get this product. This is the actual spec that produced the code above.
Paste this prompt into Claude to build this exact product:
What happened when we ran it: Claude produced the game in 163 lines and it played correctly immediately — the screenshot on this page is a scripted session where the snake ate four foods (score 40) across direction changes without a collision misfire. Zero revisions.
Note: there is no demo restriction — the demo IS the full game, and the download is the same single file. The prompt is for reproducing (or remixing) the build yourself with your own Claude subscription.
Build the classic Snake game as a SINGLE self-contained HTML file called SnakeZip (inline CSS/JS, canvas rendering, no dependencies). Dark theme, green accent.
Game: 22×22 grid on a 440×440 canvas (CSS-scaled responsively). The snake starts 3 long moving right; food never spawns on the snake; eating grows the snake and adds 10 points; every 50 points the tick interval drops (min cap) so it speeds up. Walls and self-collision end the game. Block 180° reversals. Draw with rounded rects; fade the body toward the tail; distinct head color.
Controls & polish: arrows + WASD + swipe, space to pause, start overlay, game-over overlay with score and a 'new best' callout, best score in localStorage.
Deliver the single HTML file, MIT header.
What happened when we ran it: Claude produced the game in 163 lines and it played correctly immediately — the screenshot on this page is a scripted session where the snake ate four foods (score 40) across direction changes without a collision misfire. Zero revisions.
Note: there is no demo restriction — the demo IS the full game, and the download is the same single file. The prompt is for reproducing (or remixing) the build yourself with your own Claude subscription.
Reviews
Used Free Snake Game — HTML5 Single File, No Ads? A star rating takes two seconds and helps others.
More builds
License: MIT — free for personal and commercial use, no warranty. Software is provided as is; review the code before running it in production (it's short enough to actually read).