Move platforms back and forth with pauses at the ends and carry whoever stands on them
Platforms that move by adding a bit each frame slip out of step with each other over time, run at different speeds on different screens, and let the player slide off. Here is a way to place every platform from the clock so they stay in step and carry the rider.
Why this works
When where something is depends only on what time it is, nothing can slip out of step: all platforms stay in sync, and a rider is carried by exactly how far the platform moved. Remembering speeds and flipping directions instead lets small errors grow.
When not to use it
Do not use it when platforms must react to the player, for example sinking under weight, stopping when blocked or following the player. Then move them with simple rules and hold the rider with the same shared movement.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 19 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 "Move platforms back and forth with pauses at the ends and carry whoever stands on them" (read_entry moving-platform-ping-pong-with-pauses-and-riders) 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