Spielerando

Slow income of 0.3 coins a second never shows up because every frame rounds it away

When coins are whole numbers but income per frame is a tiny fraction, rounding each frame to zero means the player earns nothing at all. Here is the bookkeeping that keeps the leftovers, gives the same result at any frame rate, and stays exact.

Why this works

Small amounts are real even when they cannot be paid out yet. Keeping the leftover and adding it to the next step means nothing is lost to rounding, and counting in whole small units means the result does not depend on how fast the device draws frames.

When not to use it

Skip it if income is always a whole number of coins per step, or if the numbers are so large that a missing fraction is invisible. The carry is then extra data in the save for no benefit.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 18 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 "Slow income of 0.3 coins a second never shows up because every frame rounds it away" (read_entry idle-fractional-income-carry) 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