In a side-scrolling co-op game the slower player gets pushed off the screen
If the screen follows whoever is furthest ahead and never goes back, the one behind eventually hits the edge. A hard wall is brutal and being killed by the edge is worse. A soft brake before the edge and the right choice of who leads make it fair. Here is the rule and what to do for a player who is gone.
Why this works
A one-way screen creates pressure, and pressure is fair only if it can be felt before it hurts. Following the player who is ahead and softly slowing the one behind gives a warning, while counting only living players keeps a fallen one from dragging everyone.
When not to use it
It is the wrong choice for levels with backtracking, puzzles or exploring, where players need to go back. Use a camera that follows both freely, and let the screen stop only in rooms with a single goal.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 18 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "In a side-scrolling co-op game the slower player gets pushed off the screen" (read_entry coop-scrolling-screen-that-does-not-trap-the-slower-player) 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