Invernadero errante
A slow incremental game about cataloguing impossible flora, built on a simulation engine kept entirely apart from the interface.
- Year
- 2025
- Role
- Design and development
- Stack
- React · TypeScript · Vite
An incremental game where you tend a glass greenhouse adrift between stars. The apparent mechanic is growing things; the real goal is cataloguing, and every species identified improves the output of all the others.
The decision that holds the project up
The engine imports nothing from React and never touches the DOM. It is plain TypeScript, and game state lives outside the component tree: the tick mutates it twenty times a second and the interface subscribes to a revision counter.
Putting that state in useState would have re-rendered the whole tree on every
tick, which is the classic bottleneck of the genre. Keeping it outside also
makes it possible to simulate four hours of play in two hundred milliseconds
from the command line, which is the only honest way to tune the balance.
Large arithmetic
Every number is a Decimal from break_infinity.js, never a number. A plain
number slipping into the chain produces a silent Infinity past 1e308, and
the bug surfaces weeks later.
Real time, not a fixed delta
Each tick simulates the interval elapsed against the system clock, with a cap per tick and a cap on absence. Recovering time the browser throttled in the background and computing progress while the tab was closed become the same mechanism rather than two.