FloatingPlayerPatch
A small mod that patches* the floating player issue, read the full description for details on why this exists and how it works.
| Last updated | a week ago |
| Total downloads | 12 |
| Total rating | 2 |
| Categories | Mods Host Only Bug Fixes |
| Dependency string | lammas123-FloatingPlayerPatch-1.3.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack_CrabGame
Legacy BepInEx 6 pack for Crab Game. Preconfigured and ready to use.
Preferred version: 6.0.577README
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! https://discord.gg/jBGMZqndT3 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 connecting and have to wait a while to join the lobby, meaning reaching player counts any higher than 30 or so could be difficult to reach
- Clients that have established a secure connection will be receiving 2 of the same/similar position packets at slightly offset times due to ping. This could lead to players seeming to stutter back and forth at higher pings and lead to a slightly worse experience, may be especially apparent when playing close proximity or chase game modes like Tag, but I think it's a worthwhile trade off to make the game playable.
- If you are afk or distant at the start or edges of large maps like Sussy Slope and several clients haven't established connections with each other, players at long distances will see players moving/teleporting several units at a time, which will also look awkward and could lead to flinging. As the host, it is in your best interest to be positioned closer to the center of the map or near the most players so that the experience of players doesn't feel as laggy. Clients with the mod will send their position to the host most frequently to try and get around this issue, but this requires the client to have the mod, and not all clients will.
- You will technically be using more network bandwidth using this mod, and it will grow exponentially the more players there are in your lobby. If you have slow or limited internet, I'd recommend sticking to hosting smaller lobbies and not using this mod, or only joining lobbies and not hosting them.
- This could amplify the effect of cheaters using player flinging cheats, due to caveat 1 where players may seem to stutter back and forth, if a cheater flings one or a couple players, those players could be more likely of flinging other nearby players as well.
I do hope this mod can bring back some life to Crab Game, I find it very fun to play, and it's even better when played with a lobby of 30+ randoms lol.
TLDR:
- This mod does not fix the root issue causing the floating players, only working around the problem (SteamP2P).
- Clients may see other players slightly or even majorly stuttering back and forth when moving with high pings or bad connections.
- As the host, you should aim to be near the majority of or as many players as you can, usually the center of the map.
- Clients with the mod will not need to be near the host in game.
- This mod will end up using more bandwith than you usually do, exponentially with higher player counts even.
- The effects of cheater's fling cheats could be amplified, and catching them will by default be harder with more players to rule out at larger lobby sizes.
Happy hosting! :D