Spielerando

Taxes and wages are skipped when fast forward jumps over midnight

Cities pay and collect at the end of a day or a month. When the game runs fast, or comes back from sleep, one step can cover several of those moments, and a check for exactly the right instant misses them. Here is how to never lose one or count one twice.

Why this works

A clock is a stretch of time, not a point. Asking which boundaries were passed since the last look, rather than whether we are on one now, makes fast forward, sleep and loading all behave the same way.

When not to use it

Skip it when the game never skips time, such as a real-time action game with a fixed small step, or when missed days should simply be lost, as in a daily reward that expires. Then checking the current moment is enough.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 26 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Taxes and wages are skipped when fast forward jumps over midnight" (read_entry day-end-events-crossed-in-one-step) 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