The grid greens up as crops climb their growth stages, tiles flash gold when a plant matures and is harvested (then replanted), red pips flag pests, blue underlines show soil moisture, and the coin curve at the bottom climbs with every sale.
CPU agriculture model
A never-shipped showcase from the GameDevelopment.GardenFarm leaf. A 12x8 tile garden is planted with a mix of crops, then the world advances one in-game day at a time. Each day a growing-degree-day model pushes plants through their growth stages, an FAO-56 / FAO-33 soil-water balance tracks depletion and water-stressed yield, a deterministic market reprices every crop, and pests roll in on warm days. All on the .NET base library with zero dependencies - the simulation frames become the images below.
The grid greens up as crops climb their growth stages, tiles flash gold when a plant matures and is harvested (then replanted), red pips flag pests, blue underlines show soil moisture, and the coin curve at the bottom climbs with every sale.
A representative day: soil types, growth stages, moisture and pests are all live state read straight off the GardenWorld tile grid.
Cumulative coins (green line) versus cumulative harvest count (blue bars). The wallet ends the 40-day season at 282 coins - a net profit of +182 after seed costs, across 120 harvests with zero crop losses.
Each call to GardenWorld.TickDay(weather) advances the whole garden by one day. For every planted tile it accumulates growing-degree-days from the day's high and low temperatures and moves the plant between the Seeded, Vegetative, Reproductive and Maturity stages; it runs an FAO-56 crop-coefficient evapotranspiration and root-zone water-balance step, so a tile that runs dry loses yield through the FAO-33 stress function; it advances a deterministic seeded market so prices drift day to day; and it rolls pest emergence inside each pest's temperature window. A tiny auto-player harvests any ripe tile and replants it. The visualisation reads that live state directly - no scripted animation. Plain C# on the base library, portable by transliteration and free of any external dependency.