Spielerando

Ambushes happen twice as often on a fast computer

A chance rolled on every screen update means the same walk through the same forest is far more dangerous for players whose screens refresh faster. This shows how to state the danger per second and still get the exact same odds on every machine.

Why this works

Chances stack up multiplicatively over time, so a danger must be defined per second of real play and converted for each short slice. Then many small slices and one big slice add up to the same total, and the screen speed no longer matters.

When not to use it

Do not use it when the danger should come in fixed beats, like a turn-based game where each step is one roll by design, or when a surprise must arrive at a set spot. There roll once per turn or place the event by hand.

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 5 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Ambushes happen twice as often on a fast computer" (read_entry encounter-chance-same-on-any-frame-rate) 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