# One-Shot Prompt

Game: Tower Defense
Theme: Volcanic Bastion
Map: Single-path switchback
Date: 2026-04-08

## Prompt

Create a complete, self-contained single-file 3D tower defense game in HTML using Three.js. The game should be playable offline once loaded, with all game logic in vanilla JavaScript and no external assets beyond the Three.js CDN. The visual tone is volcanic and obsidian, with glowing lava, ash haze, brass accents, and a sense of pressure and heat.

Build a full tower defense loop with these requirements:

- A perspective camera angled like an isometric battlefield view.
- A 3D scene with a dark volcanic ground plane, raised path tiles, atmospheric fog, glowing lava accents, and simple programmatic geometry only.
- A DOM overlay HUD with gold, lives, wave, timer, speed controls, mute toggle, tower selection, tower info, upgrade, sell, pause, restart, and next-wave controls.
- Six tower archetypes: basic, sniper, splash, slow, rapid, and special.
- Three upgrade tiers for every tower.
- Six enemy archetypes: scout, soldier, tank, sprinter, healer, and boss.
- Twenty scripted waves with a visible preview, a build phase between waves, and boss waves every fifth wave.
- Economy with starting gold, kill rewards, sell refunds, and reasonable tower pricing so the player can always recover and keep building.
- Base health of 20 lives, with bosses costing 3 lives on leak.
- Clear projectile travel, enemy health bars, tower facing rotation, hit flashes, explosion particles, and range previews.
- Mouse, touch, and wheel controls for camera pan and zoom.
- A start screen, pause overlay, victory screen, and game over screen.

Design the towers and enemies so each type is visually distinct. Give upgrade level 3 each tower a visible transformation and a special mechanic:

- Basic: piercing shots
- Sniper: critical hits
- Splash: larger blast radius plus burn damage over time
- Slow: freeze effect
- Rapid: double shot
- Special: chain lightning

Theme the tower names to the volcanic setting. Example names can include Ember Guard, Pyre Needle, Magma Mortar, Cryo Vent, Twin Geyser, and Rift Prism. Make the enemy types visually legible at a glance through shape, size, glow, and color.

Use a fixed switchback path that snakes across the map. Enemies should follow waypoints along that path. Towers may only be placed on buildable cells not occupied by the path. Show the placement grid clearly and prevent invalid placements.

Balance the game so the first few waves teach the systems and later waves escalate with mixed enemy compositions, larger numbers, and a final boss-heavy finale. Add a visible wave preview that tells the player what is coming next before they start the wave.

Keep the interface polished rather than generic:

- Use a strong display font feel in the UI.
- Use lava reds, ember oranges, soot blacks, and ash neutrals.
- Add subtle animated background texture or haze.
- Make selected towers, hovered cells, and active projectiles obvious.
- Ensure the game works on desktop and mobile.

Write the actual HTML file as a full single-page application. Include `PROMPT.md` first, then `index.html`.

## Notes

- Static file, self-hostable on Cloudflare Pages.
- No external images or models.
- Visual style: volcanic obsidian fortress.
