The monster chases faster or slower depending on the player's computer
On a fast machine the chase is brutal, on a weak one the monster crawls, and on a phone that stalls for a moment it jumps across the room. Here is the loop that makes every machine play the same chase, and the limit that stops a stall from becoming a leap.
Why this works
Computers draw pictures at different speeds, but the story of the chase should not care. If the game moves in equal slices of real time and the picture just follows, then every machine plays the same chase, only with more or less smoothness.
When not to use it
Not worth it for a turn-based game or a menu-style puzzle, where nothing moves while the player thinks. There, advance the game only when the player acts, and skip the time slices.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 23 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 "The monster chases faster or slower depending on the player's computer" (read_entry monster-speed-depends-on-the-computer) 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