FREE & OPEN SOURCE
HTML5 Games
Free Tower Defense Game — Single HTML File, No Engine (CyberGrid Defense)
CyberGrid Defense: a neon vector tower defense in one HTML file — 4 tower classes, 5-level upgrades, boss waves, waypoint pathing on a 19×11 grid. No Phaser, no assets, no build step.
What it is
CyberGrid Defense is a complete tower defense game — the genre that usually ships on Phaser or Unity — in one engine-free HTML file. Enemies stream along a neon waypoint route across a 19×11 grid; you place towers on any non-road cell and click them again to upgrade, five levels deep.
The four tower classes actually play differently: the Pulse Laser is your cheap single-target workhorse, the Cryo Node applies a 48% slow, the Plasma Cannon deals splash damage in a radius, and the Railgun trades fire rate for huge single-hit damage at nearly double the range. Every fourth wave delivers a boss with 3.5× health. Enemy health bars, beam flashes, explosion particles and the glowing path are all drawn straight onto Canvas; all audio is oscillator-synthesized.
Because the path is a simple waypoint array and the towers are a four-entry table, remixing it — new maps, new tower types, different economy — is a ten-minute text edit, not an engine project.
The four tower classes actually play differently: the Pulse Laser is your cheap single-target workhorse, the Cryo Node applies a 48% slow, the Plasma Cannon deals splash damage in a radius, and the Railgun trades fire rate for huge single-hit damage at nearly double the range. Every fourth wave delivers a boss with 3.5× health. Enemy health bars, beam flashes, explosion particles and the glowing path are all drawn straight onto Canvas; all audio is oscillator-synthesized.
Because the path is a simple waypoint array and the towers are a four-entry table, remixing it — new maps, new tower types, different economy — is a ten-minute text edit, not an engine project.
CyberGrid Defense vs the usual way
A comparable tower defense on an engine means a framework payload and a build pipeline. This is one 10 KB file.
| Feature | CyberGrid Defense (single file) | Typical engine-based equivalent |
|---|---|---|
| Files to deploy | 1 HTML file | Framework bundle + assets + build output |
| External dependencies | 0 | Game engine (Phaser/Unity/…) + toolchain |
| Art & audio assets | None — Canvas drawing + synthesized sound | Sprite sheets, audio files |
| Mobile touch support | ✓ built in | Varies |
| Embed with an iframe | ✓ anywhere | Usually |
| Readable, remixable source | ✓ ~495 lines, MIT | Minified bundles |
Server requirements & dependencies
- Any modern browser — desktop or mobile. Nothing else.
- No build step, no server, no game engine, no external libraries.
- No image or audio assets: every sound is synthesized live with the Web Audio API.
- Embeds anywhere with a plain <iframe>.
How to install
1. Download and unzip — you get index.html and a README.
2. Double-click index.html, or upload it to any static host (shared hosting, GitHub Pages, Netlify, an S3 bucket… anything that serves a file).
3. To embed it in an existing site: <iframe src="/games/index.html" width="860" height="620"></iframe>. That's the whole deployment story.
2. Double-click index.html, or upload it to any static host (shared hosting, GitHub Pages, Netlify, an S3 bucket… anything that serves a file).
3. To embed it in an existing site: <iframe src="/games/index.html" width="860" height="620"></iframe>. That's the whole deployment story.
The prompt — build it yourself
Paste this into Gemini and you'll get this product. This is the actual spec that produced the code above.
Community build: one of six HTML5 games generated by the site's owner with Google Gemini 3.1 Pro — each a true zero-shot: one prompt, one file, ~14 seconds of generation, no external libraries, images or audio (all sound is Web Audio synthesis). The exact prompt, verbatim (in Turkish, as written):
Tek bir HTML dosyasında çalışan, sıfır harici bağımlılıklı 'CyberGrid Defense' adında neon vektör grafikli bir kule savunma (Tower Defense) oyunu geliştir. 19x11 ızgara sistemi, önceden tanımlı waypoint rotası, 4 farklı kule sınıfı (tekli lazer, yavaşlatıcı cryo, alan hasarlı plazma, uzun menzilli railgun), kule yükseltme mekaniği, her 4 dalgada bir gelen Boss düşmanlar ve Web Audio API ses efektleri bulunsun.
Verified before publishing: every file read line-by-line, UI strings localized to English for this showcase, and each game deployed and played on the live demo. Tower placement is correctly blocked on road cells and upgrades scale damage and range as advertised.
Tek bir HTML dosyasında çalışan, sıfır harici bağımlılıklı 'CyberGrid Defense' adında neon vektör grafikli bir kule savunma (Tower Defense) oyunu geliştir. 19x11 ızgara sistemi, önceden tanımlı waypoint rotası, 4 farklı kule sınıfı (tekli lazer, yavaşlatıcı cryo, alan hasarlı plazma, uzun menzilli railgun), kule yükseltme mekaniği, her 4 dalgada bir gelen Boss düşmanlar ve Web Audio API ses efektleri bulunsun.
Verified before publishing: every file read line-by-line, UI strings localized to English for this showcase, and each game deployed and played on the live demo. Tower placement is correctly blocked on road cells and upgrades scale damage and range as advertised.
Reviews
Used Free Tower Defense Game — Single HTML File, No Engine (CyberGrid Defense)? A star rating takes two seconds and helps others.
More builds
Free Chevereto Alternative — Self-Hosted Image Hosting PHP Script (PixelZip)
Free Vampire Survivors-Style Game — Single HTML File (Neon Swarm Survivor)
Free Breakout Game with Roguelite Power-Ups — Single HTML File (Hyperion Breakout Pro)
Free Suika-Style Planet Merge Game — Single HTML File (Cosmic Merge 2D)
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).