← Back to Projects

Galaxy Miner

Galaxy Miner is a real-time multiplayer space mining game built entirely with vanilla JavaScript — no frameworks. Players mine resources across a procedurally generated galaxy, trade on a player marketplace, build fleets, and battle NPC factions with distinct AI strategies ranging from flanking pirates to a phase-based queen boss.

Galaxy Miner screenshot
Tech Stack

Backend

Node.jsExpressSocket.ioSQLite (WAL mode)PM2

Frontend

Vanilla JavaScriptHTML5 CanvasWeb Audio APIMobile touch controls

Testing

Vitest
Architecture Overview
  • Authoritative server at 20 ticks/second with client prediction at 60 FPS
  • Seeded deterministic world generation with identical client/server RNG
  • Proximity-based entity broadcast with spatial hashing
  • Delta compression for efficient network updates
  • Custom Canvas renderer pipeline (2,873 lines)
  • Strategy pattern NPC AI with 6 distinct faction behaviors
  • 862-line production deploy script with atomic rollback
  • 208-file vanilla JS codebase — zero framework dependencies
Claude Code Usage
12 agents 1 skill

Agents

game-server-architectclient-renderernpc-ai-designernetwork-engineeraudio-engineerworld-generatormarketplace-designerfleet-system-devdeploy-engineertest-writerbalance-tunercode-reviewer

Skills

validate-plan

Highlights

  • Agents coordinated client/server code that must stay perfectly synchronized
  • Network engineer agent optimized delta compression and spatial hashing
  • NPC AI designer created 6 distinct behavioral strategies from specification
  • Deploy engineer built an 862-line atomic rollback deployment script
Key Accomplishments
  • Zero-framework vanilla JavaScript at scale (208 files) with clean architecture
  • 6 NPC AI strategies: flanking pirates, swarm collective, formation void entities, territorial rogues, hit-and-run scavengers, phase-based queen boss
  • 26 resource types across 4 rarity tiers with player marketplace economy
  • Spatial audio engine with distance-based falloff using Web Audio API
  • Custom Canvas renderer pipeline (2,873 lines) handling parallax starfields, entities, and UI
  • 862-line production deploy script with atomic rollback and health checks