Skip to content

Co op Mapping

corkr900 edited this page Apr 24, 2024 · 5 revisions

The Basics

Co-op Helper does not synchronize vanilla entities. Instead, it creates new versions of the entities that notify other players' games when key events happen. On the other player's side, the entity will receive that update and try to replicate what happened. So for example, if a player triggers a synced zip mover, that zip mover sends a message to the other player so the other person's zip mover triggers itself.

But what does this mean?

This means there is no server-side source of truth like you're used to in most multiplayer games. Desyncs are likely to occur. The synced entities are designed to recover from desyncs on their own, but you should design your maps in a way that doesn't cause a softlock if an entity desync happens.

Co-op Helper relies on Co-op Sessions.

A co-op session is when 2 or more players "pair up" after entering a map. Doing this creates the co-op session and it persists for the playthrough of that map. It will even persist through deaths, celestenet disconnects, even through save-and-quit so you and your friend can save your progress, shut off the game, and finish your playthrough later. Returning to the overworld (whether by pause menu RTM or completing the map) will end the session, and players will have to pair up again to keep playing the map.

Yes, there is significant network latency (high ping). No, it is not the fault of Co-op Helper.

Co-op Helper is subject to the latency limitations of CelesteNet. Considering all this is fan-made for free for a silly platforming game, it's amazing we have this at all, but it also means there aren't fancy low-latency distributed regional servers for it. So speeds will always be slower than that of big title games you might be used to. At the time of writing this, most players in the USA have about a 300ms ping on CelesteNet, and some areas are higher than that. You should plan that it will take up to a second for an update from one client to reach the other, and design your maps accordingly. Lag-dependent rooms aren't fun.

Starting Your Co-op Map

Installing Co-op Helper will give you synced entity placements plus a couple other entities in Loenn.

  • You need to place a Session Picker entity at the start of your map. The Session Picker is where players will pair up to play the level. You can edit that entity to change settings like number of players needed, dash count, abilities, and more for each role.
  • If your co-op map is not playable as a single player, you should prevent players from proceeding until they've paired up with another player. The Session Gate entity is an easy way to do this; it is just a temple gate that will open when the player has joined a co-op session. Session Gates can also be configured to only open for one player in the session but not everyone. Co-op Helper also sets a flag indicating that the player has joined a co-op session and a flag indicating the player's "role", so You can make fancier stops using your imagination and some technical know-how about flags.

Roles

When players join a co-op session, they are assigned a role. A role is indicated by a number starting from zero, so in a 2-player session the roles are numbered 0 and 1. The numbers only really matter when dealing with role-specific session gates, and the role-specific flags so if you're not using either of those then you probably don't need to think about this.

Flags

  • CoopHelper_InSession - Set when the player is in a co-op session
  • CoopHelper_SessionRole_0 - Set when the player has role 0
  • CoopHelper_SessionRole_1 - Set when the player has role 1
  • CoopHelper_SessionRole_2 - Set when the player has role 2
  • ...and so on with roles

Tips and Tricks

  • You need to place a Session Picker at every place the player may enter the map. For a normal standalone or collab map, this means the start of the map and each checkpoint. Remember to put a session-gate or flag-based equivalent after each one if the map is not playable alone.
  • Put a lot of group checks along the way. The Group Button entity is useful for this; it requires all players to stand on it at the same time, and then when activated it will set a flag and set the player's spawn point to the nearest spawn point. Use the flag to open the exit via a flag switch gate or similar, and make sure to put a spawn point. That way, if the group opens the gate and then a player dies before leaving, they will still spawn at the end of the room with everyone else. This is the easiest way to prevent softlocks in this situation.
  • Always think about what happens if one player finishes the room and moves on while the other player dies. Make sure if you don't have a group button at the end of the room that either the player who died can complete the room on their own OR the player who moved on has a way to come back and replay the room so they can move on together.
  • For technical reasons, Co-op Helper recreates the co-op session after you die with the golden berry. If you're using role-specific dash counts and/or abilities, don't change those between where the players pair up and where they grab the golden berry, otherwise it might not reset correctly when you die with the golden.

Feature Requests

Is there something you want to see added to Co-op Helper? Don't be afraid to ask! Either open a ticket here or ping corkr900 on the Celeste Discord server to ask!