Let crops grow while the player is away without letting them starve
When a player comes back after a night or a month, the game must decide how much time to count. This entry shows the AI how to catch up the world fairly, what to do when the device clock is wrong, and why hunger needs a floor.
Why this works
Time away is a claim by a clock the game cannot trust, and different things deserve different amounts of it. Plants may use all of it, but a living character should never starve while the player sleeps, so every effect gets its own limit.
When not to use it
Skip it in games that must stay fair between players, such as a shared world, a race or a ranked mode, since a player could set the clock forward to gain time. There, let the server count the time, or let the world stand still while away.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 24 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Let crops grow while the player is away without letting them starve" (read_entry time-away-hunger-and-crops) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP