How bai-zihan/terrarium-simulation works
Terrarium Simulation is a terminal-first game for designing closed terrariums and observing their simulated ecosystems. The main workflow is to issue CLI commands to configure a bottle’s container, substrate, placement, hardscape, plants, and animals; sealing starts hourly survival simulation, which players can inspect, pause, or resume. The CLI also supports batch runs and saving or loading bottles. The model excerpts show simulation and ecology calculations, while README capabilities fill in setup stages whose implementations were not sampled; those internals remain grouped conservatively.
Main entry points: cli.py Command interface · model.py Hourly survival · render.py Terminal displays
Components 16
CLI interaction
- Command interface
terrarium/cli.py
Bottle crafting
- Terrarium model
terrarium/model.py - Container setup
terrarium/model.py - Substrate and moisture
terrarium/model.py - Light and placement
terrarium/model.py - Hardscape placement
terrarium/model.py - Plants and animals
terrarium/model.py
Ecosystem simulation
- Environment cycles
terrarium/model.py - Ecological responses
terrarium/model.py - Hourly survival
terrarium/model.py
Observation and management
- Bottle manager
terrarium/cli.py - Observation reports
terrarium/cli.py - Terminal displays
terrarium/render.py - Bottle files
terrarium/cli.py
Other components
- Player
- Local files
Connections 18
- Player → Command interface: issues commands
- Command interface → Container setup: configures
- Command interface → Substrate and moisture: configures
- Command interface → Light and placement: configures
- Command interface → Hardscape placement: places
- Command interface → Plants and animals: adds and tends
- Command interface → Bottle manager: manages bottles
- Command interface → Hourly survival: runs ticks
- Command interface → Terminal displays: requests views
- Bottle manager → Hourly survival: advances bottles
- Bottle manager → Observation reports: collects changes
- Hourly survival → Environment cycles: updates conditions
- Hourly survival → Ecological responses: updates organisms
- Terminal displays → Terrarium model: reads state
- Command interface → Bottle files: loads and saves
- Bottle files → Local files: reads and writes
- Observation reports → Command interface: prints observations
- Terminal displays → Command interface: returns display