This is a live experiment on a 2 KiB MCU. I know the server has limited capacity, and one load test needed a manual reset. I accept those limits for this project and hope it holds up while people take a look.
Room Terra is a shared 32 × 32 ecosystem on an Arduino UNO Mini Limited Edition, ATmega328P at 16 MHz. Plants feed herbivores; predators hunt them. Visitors spend a shared reserve to plant or add animals. The world keeps running when every browser closes.
The room’s sensors drive the ecosystem. Light controls plant growth and the map’s day/night appearance: 320 lx is full daylight, while sustained darkness slows ecological activity to 1/32 speed. Humidity influences simulated soil moisture; temperature affects growth and animal metabolism. CO₂, adjusted for atmospheric pressure, adds bounded changes to growth and energy consumption. These inputs affect the food supply, so prolonged darkness, uninterrupted daylight or excessive light can eventually cause population collapse. Everyone sees the same world.
The board reads temperature, humidity, light, pressure and CO₂, runs the simulation and serves its website from Flash. W5500 handles Ethernet/TCP/IP; the browser decompresses HTML and draws the interface. Access is plain HTTP through router port forwarding.
Day and night
My room reaches about 320 lx, used as full daylight. The map dims with the measured light. After three minutes at ≤25 lx it enters night; ≥41 lx for three minutes wakes it. Animals and shelter outlines remain visible. Night biology runs at 1/32 speed. Prolonged darkness or excessive light can exhaust the food chain.
The paired screenshots use the actual renderer with one synthetic snapshot at 320/0 lx: a controlled appearance comparison, not two live measurements. The page's automatic light/dark theme is separate.
How it fits
- 584 B world state: 256 B plants, 256 B for 128 animal slots, 72 B metadata.
- 512 B shared HTTP workspace, four connection slots. The MCU streams compressed data from Flash.
- 480 B binary world body: 48 B metadata + 256 B plants + 176 B packed animals; headers cost extra.
- 1,492 / 2,048 B static SRAM; 556 B remains for stack/runtime.
The deployed 0.12.9 image uses 32,250 / 32,256 B application Flash, including an 11,385 B gzip website. The public edition uses 31,836 B / 10,971 B gzip after removing deployment analytics/tags. Integer maths, compact sensor drivers and small cooperative work units keep the application within budget.
Selecting a cell is local. A button sends PUT /life/XYZ; 202 acknowledges the queue. At the next 10-second step Arduino validates and applies it; independent GET /life polls show the result to everyone.
Internet load tests
Two external VPS, direct HTTP, mixed sensor/world viewers. These tested 0.11.15, before Terra: sensors every 5 s, the old world roughly every second; 3.5 s data / 5 s page deadlines. Synthetic HTTP clients, not full browsers.
- 2 clients; 90 s; 108 / 108 valid replies.
- 10 clients; 60 s; 317 / 321 valid replies.
- 20 clients; 60 s; 416 / 459 valid replies.
- 40 clients; 60 s; 546 / 708 valid replies.
- 10 clients, repeat; 120 s; 475 / 527 valid replies.
- 2 clients, after reset; 600 s; 729 / 734 valid replies.
The 10-client repeat lost connectivity near 97 s; 14 recovery probes failed, then a manual reset restored service. The cause is unresolved. A later 0.12.3 Terra probe returned 180/180 replies over 90 s from one VPS. Neither establishes current multi-client capacity; I expect slow loads or failures under a crowd.
Source, build and evidence · Live board
Original code: MIT; upstream licenses retained. The world restarts after power loss.
What would you change in the shared-world mechanics within this memory budget?