How resaki1/stellar-nomad works
Stellar Nomad is a browser-based space exploration and resource-gathering game. The documented player journey starts in Earth orbit, proceeds through ship piloting and asteroid mining, and uses gathered resources for crafting and upgrades before exploration of other planets. Its runtime combines a 3D scene, celestial rendering, streamed asteroid simulation, ship controls, HUD, and research/progression state. README statements establish the broad gameplay links; source-index references and excerpts support the internal asteroid, research, and rendering links. Some gameplay component wiring is not shown, so those links are documented rather than source-verified.
Main entry points: Game.tsx Game session · ResearchPanel.tsx Research panel · CelestialBody.tsx Celestial bodies · runtime.ts Asteroid runtime
Components 20
Player gameplay
- Game session
src/components/Game/Game.tsx - Ship piloting
src/components/Spaceship.tsx - Navigation controls
src/components/Navigation/Navigation.tsx - Asteroid mining
src/components/Mining/MiningSystem.tsx
World rendering
- 3D scene
src/components/Scene/Scene.tsx - Celestial bodies
src/components/celestial/CelestialBody.tsx - Cloud volumes
src/components/celestial/bodies/noiseVolumes.ts - Light model
src/components/space/photometry.ts
Simulation
- Asteroid fields
src/components/Asteroids/AsteroidField.tsx - Asteroid runtime
src/sim/asteroids/runtime.ts - Chunk generation
src/sim/asteroids/generation.ts - Chunk worker
src/workers/asteroidChunkWorker.ts - Asteroid persistence
src/sim/asteroids/persistence.ts
Interface and progression
- Game HUD
src/components/HUD/HUD.tsx - Research panel
src/components/HUD/ResearchPanel/ResearchPanel.tsx - Research state
src/store/research.ts - Research ticker
src/components/Research/ResearchTicker.tsx - Items and research
src/data/content.ts - Toast state
src/store/toast.ts
Other components
- Player
Connections 23
- Player → Game session: starts journey
- Game session → Ship piloting: pilots ship
- Player → Navigation controls: steers with
- Ship piloting → Asteroid mining: mines asteroids
- Asteroid mining → Player: yields resources
- Player → Celestial bodies: explores planets
- Game session → 3D scene: presents world
- 3D scene → Celestial bodies: renders
- Celestial bodies → Cloud volumes: samples volumes
- Celestial bodies → Light model: uses lighting
- Game session → Asteroid fields: shows fields
- Asteroid fields → Asteroid runtime: streams chunks
- Asteroid runtime → Asteroid persistence: reads and writes
src/sim/asteroids/runtime.ts - Chunk worker → Chunk generation: generates chunks
src/workers/asteroidChunkWorker.ts - Chunk worker → Asteroid runtime: returns chunks
- Game session → Game HUD: displays status
- Player → Research panel: chooses upgrades
- Research panel → Research state: reads and updates
src/components/HUD/ResearchPanel/ResearchPanel.tsx - Research panel → Items and research: loads definitions
src/components/HUD/ResearchPanel/ResearchPanel.tsx - Research panel → Toast state: updates notices
src/components/HUD/ResearchPanel/ResearchPanel.tsx - Research ticker → Research state: advances research
src/components/Research/ResearchTicker.tsx - Research ticker → Items and research: loads definitions
src/components/Research/ResearchTicker.tsx - Research state → Items and research: checks prerequisites
src/store/research.ts