How sparticle999/spacecompany works
Space Company is a browser-based incremental game: players build resource production, research unlocks, expand through the solar system, then pursue interstellar exploration and galaxy-scale projects. The map highlights the economy, progression, interface, and long-term systems documented in the README. The excerpts show selected resource and UI interactions; many runtime links and some capabilities are documented but not visible in the sampled code, so those links are omitted or marked unverified.
Main entry points: resources.js Resource economy · interstellar.js Interstellar exploration · game.js Game runtime · core.js Production logic
Components 29
Resource economy
- Production logic
core.js - Resource economy
resources.js - Resource definitions
data/resourceData.js - Building definitions
data/buildingData.js
Progression systems
- Science production
science.js - Research system
tech.js - Research definitions
data/techData.js - Achievements
achievements.js - Achievement definitions
data/achievementsData.js - Wonders
wonder.js
Space expansion
- Solar system
solarSystem.js - Rocket travel
rocket.js - Interstellar exploration
interstellar.js - Star catalog
data/starData.js - Stargaze and rebirth
stargaze.js - Stargaze definitions
data/stargazeData.js
Game interface
- Tab framework
ui/gameTabUI.js - Core game interface
ui/legacyUI.js - Resource interface
ui/resourceUI.js - Achievement interface
ui/achievementUI.js - Interstellar interface
ui/interstellarUI.js - Stargaze interface
ui/stargazeUI.js
Runtime and state
- Game runtime
game.js - Save and load
saving.js - Settings
settings.js - Statistics
statistics.js - Notifications
notification.js - Game variables
variable.js
Other components
- Player
Connections 22
- Player → Game runtime: plays
- Production logic → Resource economy: adds production
resources.js - Production logic → Settings: formats costs
core.js - Resource economy → Research system: reads efficiency
resources.js - Resource economy → Statistics: checks unlocks
resources.js - Building definitions → Resource economy: defines producers
- Research definitions → Research system: defines research
- Achievement definitions → Achievements: defines goals
- Wonders → Statistics: records milestones
wonder.js - Wonders → Interstellar exploration: unlocks access
wonder.js - Solar system → Rocket travel: supports travel
- Star catalog → Interstellar exploration: supplies star catalog
- Stargaze interface → Stargaze and rebirth: reads progression
ui/stargazeUI.js - Stargaze interface → Interstellar exploration: reads rocket parts
ui/stargazeUI.js - Interstellar interface → Interstellar exploration: renders exploration
ui/interstellarUI.js - Tab framework → Player: accepts navigation
- Core game interface → Settings: formats values
ui/legacyUI.js - Resource interface → Resource economy: shows resources
- Achievement interface → Achievements: shows achievements
- Game runtime → Save and load: persists progress
- Game runtime → Notifications: reports events
- Stargaze definitions → Stargaze and rebirth: defines upgrades