A strategic, grid-based survival game built from scratch using HTML5 Canvas, CSS3, and Vanilla JavaScript. Defend your territory against relentless waves of zombies by deploying specialized units and managing your gold resources in real-time.
- Dynamic Unit Deployment: Drag and drop different unit types onto the grid to build your defense line.
- Resource Management: Collect gold by hovering over falling coins to fund your army.
- Status Effects: Utilize advanced combat mechanics including Freezing (Ice) to slow enemies and Burning (Fire) for damage-over-time.
- Scaling Difficulty: Survive against various enemy types like Standard zombies, high-health Brutes, and the formidable Titans.
- Real-time UI: Integrated survival timer, score tracking, and resource counters.
- Zombie Wave (HTML): Defines the game container, UI side-bar for units, and the Canvas element.
- script.js: The main logic file containing game classes (Defender, Enemy, Bonus, Particle), collision math, and the animation loop.
- style.css: Manages the layout, unit card visuals, and the dark-themed game overlays.
- Game BGM.mp3: The looping background score for atmosphere.
- Collect Item Sound Effect.mp3: Feedback audio for gold collection.
Core Systems
- Game Engine: Built on a custom requestAnimationFrame loop for smooth 60 FPS rendering.
- Collision Engine: Implements circle-to-rectangle and proximity-based detection for projectiles and resource collection.
- Particle Engine: Custom Particle class handles visual feedback for unit-specific effects (e.g., fire embers and ice crystals).
- Unit AI: Defenders detect enemies in their specific row and trigger attack cycles automatically.
| Unit Type | Cost | HP | Special Ability |
|---|---|---|---|
| Standard | $100 | 100 | Balanced fire rate and damage. |
| Fire | $150 | 80 | High damage; inflicts Burn (DOT). |
| Ice | $200 | 160 | Slows enemy movement by 60%. |
| Shield | $50 | 600 | High-durability wall (No attack). |
| Remover | $0 | - | Safely removes units from the grid. |
- Download or clone the repository.
- Ensure all files (HTML, JS, CSS, and MP3) are located in the same root directory.
- Open the Zombie Wave HTML file in any modern web browser (Chrome/Microsoft Edge and etc).