A Stardew Valley-style 3D farm in Godot 4: crops, watering and chickens
Till, plant, water and harvest 18 plots, sell through the shipping box and raise chickens, tame or wild. How I built Gotic's Granja del Roble with crop rules in about 40 lines.

The brief I gave myself was short: "plant seeds and watch them sprout, like Stardew Valley but in 3D, and chickens to raise that lay eggs, tame or wild." The result is the Granja del Roble (Oak Farm), a meadow in the west of the island with a branch road off the one to Poniente.
When you arrive, Rosa the farmer gives you a handful of seeds and a few coins. The field has 18 plots and everything happens on one key: R (or USAR, "use", on mobile) on a plot does whatever it needs, whether that's tilling, planting, watering or harvesting. The watering can is refilled at the well, T (SEMILLA, "seed") switches what you plant, and the harvest is sold in the shipping box. There are radishes, carrots, wheat and pumpkins, each with four growth stages you can see in 3D.
How it's built
The rules live in a class with no nodes, cultivos.gd, the same way I handled plants in my earlier game Huerto. Each crop is one line of data:
"rabano": {"name": "Rábano", "seed": 5, "stage": 30.0, "water": 90.0, "yield": 1,
"leaf": Color("5f9a3c"), "fruit": Color("d8475a")},
The key decision was to count time in seconds of play, not in days. A watered plot grows while its water lasts; dry, it stops, but it never dies. That way it works the same with the day-night cycle on or off. A radish ripens on a single watering in 90 s, and a carrot needs two. That's faster than Stardew, on purpose.
var used := minf(seconds, float(plot["wet"]))
plot["wet"] = float(plot["wet"]) - used
plot["progress"] = minf(float(plot["progress"]) + used, Crops.total(plot["crop"]))
The same function covers time with the app closed: when you come back, watered plots grow by whatever water they had left (8 hours at most). And when the weather mod arrived later, rain waters the field without the farm knowing that mod exists.

Tame chickens are bought from Rosa, up to six. With wheat in the feeder each one lays an egg every 4 minutes. Petting them raises their affection, and at full affection about 4 in 10 eggs come out golden. In the incubator, an egg becomes a chick after 8 minutes and a hen after 12.
Wild chickens live at two spots on the forest edge, 60–70 m away, each with a nest hidden in the grass. Run up to them (within 7 m) and they bolt. Walk slowly with wheat and they follow you back to the yard, where they stay as tame hens.
I picked the farm's site outside the game: a 36 m clearing with 2.6 m of slope where no plot strays more than 0.24 m from its centre height. The tilled soil follows the terrain instead of being a flat box. The branch road is 239 m long, computed with an A* over the terrain and stored as constants.
What went wrong
- Wild chickens always ran away, even when you walked slowly, and every test passed. None of them moved the player slowly next to a hen. A mutation exposed it, and the behaviour is now tested both ways: running scares them, walking doesn't.
- After refilling the can, every plot still said "0/10". The prompt was only rebuilt when that plot changed. Now filling and watering refresh them all.
- A text value saved in the incubator field was read as 0, leaving an egg about to hatch. The "inconsistent save" test caught it.
- The suite grew so much (every test save loads every mod) that
tests/run.shhad to raise its timeout to 480 s.
Measured on PC: 842 passing checks on a clean tree, 0 golden eggs out of 40 without affection and 20 to 60 out of 100 at full affection (fixed seed). Draw cost: 212 calls looking at the field, 484 on foot at 1600×720.
Still unverified
None of this has been tested on a phone: APK export was failing in that environment. Nobody has actually played the prices and timings. And the chickens have no physics, so a wild one can get stuck against a tree on the forest edge.