I'll build a top-down tower defense game with detailed SVG-rendered characters. Let me plan the structure:
- Main App: routes between menu, map select, difficulty select, and game
- Units: Soldier (helmet+uniform) and Scout (bandana+light gear), each with 8 levels that add visible detail
- Maps: Forest, Desert, Snow — each with a unique path
- Game loop: Canvas-based with SVG-like detailed character rendering
Let me start by exploring the project and then building it out.
Now let me create the type definitions and game data:
Now let me create the rendering module with detailed character drawing:
Now let me build the main Game component with the game loop:
Now let me create the menu components and wire everything together in App.tsx:
Now let me build to check for errors:
Let me improve the game with two fixes: spawn timing should respect game speed, and ESC should cancel placement:
Let me fix the canvas sizing so it scales properly on smaller screens:
Let me make projectiles track their moving targets instead of shooting at a static position:
The build succeeded. Here's what I built:
Tiny Defenders — Top-Down Tower Defense
Menu flow: Main Menu → pick one of 3 maps → pick one of 3 difficulties → play.
3 Maps (with unique themes & decorations)
- 🌲 Whispering Forest — zig-zag path with tree dots
- 🏜️ Scorched Dunes — winding path with pebbles
- ❄️ Frostbite Pass — mountain trail with snowfall
3 Difficulties
- Easy (300 gold, 30 lives, 0.75× enemy HP, 1.25× reward)
- Normal (200 gold, 20 lives, balanced)
- Hard (150 gold, 12 lives, 1.5× enemy HP, 0.9× reward)
2 Units — each upgradable to Level 8 with visual progression
- 🎖️ Soldier — helmeted fighter with rifle
- L1: basic helmet + face · L2: chin strap · L3: shoulder rank stripes · L4: star emblem · L5: goggles · L6+: backpack + muzzle flash · L8: golden wreath around star
- 🏹 Scout — bandana'd ranger with pistol/rifle
- L1: bandana with tail knots + hair peeking · L2: forehead goggles · L3: bullet bandolier · L4: face mask · L5: backpack + rifle · L6: amber goggle lenses · L7: red elite bandana · L8: feather plume
Units rotate to face their target and display a range ring when selected or placing.
Enemies (4 kinds, scaling through 10 waves)
- 👺 Grunt (red blob) · 🦊 Runner (orange triangle) · 👾 Brute (purple spiked) · 👑 Boss (crowned red with HP bar)
Game Features
- Canvas-based top-down rendering with themed decorations
- Buy → place → upgrade → sell loop
- Tracking projectiles (yellow for Soldiers, blue for Scouts)
- HP bars on enemies, gold/lives HUD, wave counter
- 1×/2× speed toggle, Esc to cancel placement
- Victory/Defeat banners with restart
The whole game runs in the browser with no external assets — all characters are drawn procedurally on canvas with layered shapes (shadows, uniforms, skin, eyes, hair, headwear, emblems, gear).
Files built: src/game/types.ts, src/game/data.ts, src/game/render.ts, src/game/Game.tsx, src/game/Menu.tsx, src/App.tsx, index.html