Portföye dön
Yayında

Living Mars Machine

A browser Mars colony that runs itself — place buildings on procedurally generated hex terrain and watch a deterministic stock-and-flow simulation redistribute power, water, oxygen, food and heat every tick. At night solar output drops to zero, the batteries carry the colony, and the allocator sheds the mine and then the greenhouse to keep life support alive until sunrise.

GameWeb AppFrontend
Projeyi Görüntüle
Living Mars Machine kapak görseli

A browser Mars colony that runs itself — place buildings on procedurally generated hex terrain and watch a deterministic stock-and-flow simulation redistribute power, water, oxygen, food and heat every tick. At night solar output drops to zero, the batteries carry the colony, and the allocator sheds the mine and then the greenhouse to keep life support alive until sunrise.

Nothing in the repository is an asset: the terrain, all nine buildings, the rocket, the sky, the pipework and every icon are generated in code — no model, texture, HDRI or icon package anywhere. The simulation core (src/sim) is pure TypeScript, kept free of Three.js, React and the DOM by an ESLint rule, and runs 197 buildings at 0.116 ms/tick.

Play: https://farukcan.github.io/living-mars-machine/

GitHub: https://github.com/farukcan/living-mars-machine

Tech stack

  • TypeScript
  • React 19 + React Three Fiber + Three.js r185 + postprocessing
  • Zustand — fixed 10 Hz simulation loop, 4 Hz HUD snapshot
  • Tailwind CSS + hand-drawn SVG icons
  • Vite
  • Vitest (simulation core) + Playwright (e2e, reference screenshots)

The colony at midday, founding rocket on the pad

The same colony after dark — batteries carrying life support

Son güncelleme: