FloatingPlayerPatch
A small mod that patches* the floating player issue, read the full description for details on why this exists and how it works.
About this mod Author’s original text
CrabGameFloatingPlayerPatch
A small BepInEx mod for Crab Game that patches* the floating player issue.
This is a long read, but I recommend reading through it or at least reading the TLDR at the end to give players joining your lobbies the best experience.
Need help or wanna reach out? Do so on the Discord!
This mod does have a soft dependency on ModList.
What started the connection issues
Some time ago (around March 2024) after an update to the way Steam handles Peer2Peer connections (SteamP2P), Crab Game lobbies with around 12 players or more started seeing players just floating in place for the entirety of games, never moving or rotating, only punching and using items. The reason for this is whatever that Steam P2P update did made it more difficult to establish P2P connections with players, especially with those located further away or when the lobby has larger player counts. Personally, I suspect that Steam implemented some form of rate limit on how many connections can be established within a period of time, which would explain why a ton of players joining at once, and larger lobbies in general, have these issues.
What causes floating players
Most games will make clients send position and rotation data to the host for the host to verify, and then the host will either forward that information to all clients or block it if the data seems illegitimate or cheated, which is why server side anti cheats work. The problem with Crab Game is that this position and rotation isn't sent to the host and then to all players, rather it is sent directly from client to client with no host to verify it as the middle man. This technically means cheaters can lie to the host about their position to seem legit, and then use movement cheats and fling other players out the map without the host knowing who is doing it and I hate it, but that's getting off topic lol.
Because of this method of sharing player position and rotation data, and with players not being able to establish connections with each other due to the Steam P2P update, player position and rotation packets never reach each other, thus resulting in players floating indefinitely until a connection is randomly established. Some may ask the question: "Why does the server host never see any floating players?" and that's because a connection had to be established for the client to join the lobby in the first place. Until that connection is established, you will sit on the joining server screen. Another question that could be asked is: "Why can I see floating players punching, holding items, attacking with said items, and firing guns?" which is because that information isn't sent client to client. The client swinging sends the packet to the host, and then the host sends a packet to the rest of the clients to handle.
Though this method Dani used isn't exactly safe against cheaters who abuse it or good for the Steam P2P connection issues, it was good at updating player positions and rotations faster (as it'd take less time for packets to reach each other if there's no middle man) and also helped somewhat with internet bandwith usage. You can see it when looking at players far away on maps like Sussy Slope (the ice Race map with the large slide), the game sends less postion and rotation packets the further you are from somebody, resulting in them looking like they're telporting a couple units at a time.
How the mod works
Essentially all the mod does is take the positions and rotations the clients send to you as the host, and then send those positions and rotations back out to all clients. Though this seems like a foolproof method of fixing the floating player issue, there are some caveats:
- This does not actually fix the root issue of connections not being established between clients, but merely works around it with clients that were able to establish a connection with you as the host and actually get in the lobby. Some players may still have problems connect
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: