Excellent — I'll add a ship dock with 5 purchasable ships (each with its own hull shape, stats, and firing pattern) and an abilities lab with 4 unlockable active abilities (Blink, Overdrive, Time Warp, Sentry Drones) bound to Q/C/F/R. Everything persists in localStorage, and the Hangar gets tabs.
First, the ship and ability definitions:
Update the HUD state types:
Now the engine — ship/ability state, persistence, purchases, ship firing patterns, abilities, drones, and time warp:
Now persistence, purchase/select methods, ability usage, and updated stat getters:
Add WEAPON_NAME map, update pushHud, reset, and the shoot() ship patterns:
Now reset ability timers and implement ship-specific firing patterns in shoot():
Now tick ability timers and drones in update(), and apply time-warp scaling to enemies and enemy bullets:
Slow enemy bullets during warp:
Now per-ship hull rendering, drone rendering, and a chrono-field tint:
Engine complete. Now wire up GameCanvas (initial HUD state + ability hotkeys Q/C/F/R):
Now the HUD: ability bar at bottom-center with cooldown fills, and show the ship weapon name:
Now rebuild the Shop with tabs for Systems / Ships / Abilities:
Pass the new callbacks through Overlay and GameCanvas:
Update the control legends to mention ability keys:
Build passed. Here's everything that was added:
🚀 Ship Dock (Hangar → SHIPS tab) — 5 buyable ships, each with a unique hull silhouette (rendered both in-game and as an SVG preview in the shop), color scheme, stats, and base firing pattern:
| Ship | Cost | Pattern | Trade-off |
|---|
| Vanguard | free | Twin parallel bolts | Balanced |
| Hydra | 300 | 3-way tri-cannon | +5% hull, slightly slow |
| Tempest | 550 | Blistering alternating gatling stream | -15% hull, +12% speed |
| Reaper | 850 | 5-pellet flak shotgun with kick | +25% hull, -8% speed |
| Lancer | 1300 | Slow piercing rail bolt (skewers 6 enemies) | -10% hull, +5% speed |
Buying auto-equips; you can swap ships anytime (even mid-run between waves) with the EQUIP button — max HP rescales proportionally. Weapon pickups (Spread/Rapid/Plasma) still temporarily override your ship's gun, and the HUD now shows your ship name + current weapon.
✨ Ability Lab (Hangar → ABILITIES tab) — 4 unlockable actives, locked until purchased:
- ⚡ Blink Drive (
Q, 250c, 7s CD) — teleport to your cursor with brief invulnerability
- 🔥 Overdrive (
C, 450c, 16s CD) — double fire rate +25% damage for 6s, with ember particle trail
- ⏳ Chrono Field (
F, 700c, 22s CD) — enemies and their bullets slow to 35% for 4s, cyan screen tint
- ✛ Sentry Drones (
R, 950c, 26s CD) — two drones orbit you for 10s, auto-targeting the nearest hostile
Unlocked abilities appear as an ability bar at the bottom-center of the HUD showing hotkey, cooldown countdown with a fill overlay, and a glow when active.
Persistence — owned ships, equipped ship, and unlocked abilities are all saved to localStorage alongside coins/upgrades, so your fleet carries across sessions. New files: src/game/ships.ts and src/game/abilities.ts; the Shop is now tabbed (SYSTEMS / SHIPS / ABILITIES).
Files built: src/game/ships.ts, src/game/abilities.ts, src/game/types.ts, src/game/engine.ts, src/components/GameCanvas.tsx, src/components/Hud.tsx, src/components/Shop.tsx, src/components/Overlay.tsx