Free Slingshot Castle Demolition Game — Single HTML File (Castle Breaker 2D)
Castle Breaker 2D: Angry Birds-style slingshot demolition in one HTML file — dotted trajectory preview, stacking physics, wood/stone/TNT blocks with chain explosions. Zero dependencies.
What it is
Blocks carry momentum, tumble and re-stack with box collision physics; the green targets take fall damage when their support is knocked out, which makes undermining a castle as valid a strategy as hitting things head-on. Clear all targets and the next, larger castle assembles itself. Four shots per castle keeps runs tense.
Our review added one quality-of-life fix: running out of shots with targets left now shows an "OUT OF SHOTS" overlay with click-to-rebuild, instead of leaving the player at a dead board.
Castle Breaker 2D vs the usual way
Physics demolition games normally lean on Box2D or Matter.js. The ballistics, stacking and TNT chains here are ~80 lines of hand-rolled vanilla JS.
| Feature | Castle Breaker 2D (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 | ✓ ~448 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
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.
Tek bir HTML dosyasında sıfır bağımlılıkla çalışan 'Castle Breaker 2D' adında sapanla kale yıkma fizik oyunu yaz. Sapanı gererken noktalı parabolik yörünge önizlemesi çizilsin. Kaleler tahta, taş ve vurulduğunda çevresindeki blokları havaya uçuran TNT bloklarından oluşsun. Tüm hedefler yıkıldığında otomatik olarak daha zorlu bir sonraki seviyeye geçsin.
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. One real gap found and fixed in review: no feedback when shots ran out with targets remaining — the game just sat there. Added an OUT OF SHOTS overlay with click-to-rebuild (the fix is the file's only post-generation change beyond localization).
Reviews
Used Free Slingshot Castle Demolition Game — Single HTML File (Castle Breaker 2D)? 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).