Block Siege is a physics-driven tower defense HTML5 game where you build defenses out of real physics blocks instead of placing static towers. Every block has mass, friction, and collision — enemies can knock them down, get crushed by falling debris, or be stopped by a well-built wall.
The game combines the strategic depth of tower defense with the unpredictable chaos of physics simulation. Five block types, seven enemy types, four active abilities, a permanent upgrade shop, and 10 campaign waves plus endless survival mode give players deep replayability.
Built entirely with vanilla JavaScript, HTML5 Canvas 2D, and the Web Audio API — no frameworks, no build tools required. All graphics are rendered procedurally on canvas and all sound effects are synthesized at runtime, but the game also includes replaceable PNG sprites and MP3 audio files — drop in your own art and sound to reskin the entire game without touching code. The only external dependency is Matter.js, loaded via CDN with a fallback.
During the build phase, players spend gold to place physics blocks inside a designated build area. Blocks drop from above and settle with real physics — a poorly supported block will topple. Players must think about weight distribution, structural support, and block placement to create an effective defense.
When the player starts a wave, enemies spawn from the left side of the screen and charge toward the castle on the right. Enemies physically collide with blocks — they push, climb, and break through. Blocks can crush enemies when they fall, and cannons auto-fire at the nearest target. The castle takes damage when enemies reach it.
Each cleared wave awards a gold bonus. Gold is used to buy blocks during the run and is also added to the player’s persistent wallet. Between runs, players spend wallet gold in the Shop to permanently upgrade block durability and purchase abilities for future runs.
| Block | Cost | Properties |
|---|---|---|
| Wood | 50 | Lightweight and cheap. Best for early waves and sacrificial layers. |
| Stone | 100 | Heavy and durable. The core of any good defensive wall. |
| Metal | 220 | Extremely heavy and tough. Front-line defense for late waves and bosses. |
| Spike | 75 | Damages enemies on contact. Excellent for chokepoints. |
| Cannon | 300 | Auto-fires cannonballs at enemies within 600px. Deals massive damage. |
| Enemy | Gold | Description |
|---|---|---|
| Goblin | 10 | Fast and weak. Standard cannon fodder. |
| Orc | 25 | Tougher, slower. Pushes through light defenses. |
| Troll | 75 | Slow, heavy hitter. Destroys dense walls efficiently. |
| Bat | 15 | Flies over walls. Requires cannons or spikes (which reach upward). |
| Archer | 30 | Ranged attacker. Damages blocks from a distance. |
| Shaman | 40 | Heals nearby enemies. Must be prioritized. |
| Boss | 500 | Massive HP and damage. Appears at waves 5 and 10. |
| Release Date | 2026 |
|---|---|
| Last Update | 2026 |
| Category | HTML5 Games |
| Technology | Vanilla JavaScript, HTML5 Canvas 2D, Web Audio API, CSS3 |
| Physics Engine | Matter.js v0.20.0 (CDN-loaded with fallback) |
| Input | Pointer Events API (mouse + touch + stylus) + Keyboard |
| Canvas Resolution | 1280×720 (scales responsively) |
| Audio | Replaceable MP3/WAV files + procedural Web Audio fallback. Looping BGM with pause/resume support. |
| Sprites | 57 replaceable PNG files + procedural Canvas 2D fallback |
| Storage | localStorage for wallet, upgrades, and inventory |
| Code Lines | ~7,500+ total across all JS files |
| Dependencies | Matter.js (CDN, not bundled) |
| Mobile Support | Yes — responsive layout, touch-optimized controls |
| Frameworks | None — zero build tools, zero frameworks |
| Browser Support | Chrome 80+, Firefox 80+, Safari 13+, Edge 80+ |
Block Siege is designed to be fully reskinnable without touching game code:
Drop PNG files into Assets/sprites/ with matching filenames to replace any block, enemy, projectile, castle, or icon graphic. 57 sprite files are included. If a file is missing, the game silently falls back to the original Canvas 2D procedural rendering — no code changes needed.
Drop MP3 (or WAV/OGG) files into Assets/audio/ with matching filenames to replace any sound effect or background music. 19 audio files are included (18 SFX + 1 looping BGM). If a file is missing, the game falls back to procedural Web Audio synthesis.
All game parameters are centralized in config.js, separate from game logic:
style.cssindex.htmlicons.js, or replace via Assets/sprites/If you have any questions, run into an issue, or need customization assistance, feel free to reach out via the CodeCanyon comments section or contact the author directly: