We had two more playtests this past week. Playtest 2 was on a Monday with at most maybe 9 players and then Playtest 3 saw up to 16 players I believe. Let’s talk about the results
The Good
Lots of bugs were found in Playtest 2, I fixed all of them for Playtest 3 and besides an initial hiccup (where voice chat and round ambiance was broken) there were only 2 bugs found. This is great since it means less bugs!
Well sort of, there were more bugs, but they might be related to networking stuff which we’ll get to later.
Some good direction on new features/QOL changes was also figured out. End of round breakdown is still missing and it should be in the game soon. There’s little tweaks like clearing the “last seen time” when we switch from Warm up -> Main game state.
The Bad
Something isn’t right with the networking.
For these playtests I ran a dedicated server on my computer, and while I think the lag was better than when I ran a listen server for Playtest 1, I think a lot of players had a laggy time and later on in the playtest some functionality just straight up broke.
Network Lag?
Brood Aliens move pretty fast, and right now clients are simulating their own pawns. This seems to be the “standard” S&Box way to do things. You are the owner of your own pawn, so all other players/connections get the position of your pawn from you.
However I’ve noticed that if a player lags, their pawn starts teleporting around the place. It doesn’t always smoothly interpolate to where they should be. Also i’ve noticed that if the players starts to sprint and they’re moving very fast (ie they are in brood alien form) there is a higher chance that they’ll start teleporting around the place.
This is bad. Like really bad.
I’ve always noticed some weird “jank” with multiplayer movement in S&Box, but there’s gotta be some way to solve this, right? And in a game like Morbus where some players need to move fast, the other players need to see them clearly.
Here are things i’m considering to improve our situation:
Boost Networking Update Rate
By default the networking update rate is 30. This means 30 times a second we’re looking at objects and deciding whether or not to update their networked values.
So at most another player will only get a position update from us 30 times a second. If we’re a brood alien and we’re moving fast, that could be really bad for the other player.
Counter Strike 2 uses a 64hz tick rate, I was essentially having a 30Hz tick rate on networking updates. I didn’t realize this setting existed until I was writing this blog post so this will be the first thing we play around with.
Get rid of Rigid Body
I’ve been using a player controller that’s based on Facepunch’s Player Controller. It partially uses the game’s physics engine for movement.
I was encountering weird issues where players would jump into each other and it could cause them to rapidly rebound away from each other at illogical speeds. A suggestion was to make clients disable RigidBodies on all other players. I think this fixed the issue, but I’ve been thinking about things a bit more existentially.
I’ve talked to a couple other game developers in the community and a lot of them seem to avoid using RigidBodies in their player controllers. I’m thinking I should do the same. I don’t want to involve the physics system in player movement, it seems like a recipe for disaster.
Server Authoritative Movement
I’ve started to think about how I could make movement server authoritative. I want movement to be responsive on the client side, but I also don’t want to be relying on the client to tell all other clients their position.
It’s also been brought to my attention that if a client fails to acknowledge an update, a minimum of 250ms passes before another update is sent. Huge lag.
I imagine this will be very hard at best, and at worse, impossible in S&Box. Kuro a formed Facepunch developer who made the networking system in S&Box posted a “sbox-prediction” library where he prototyped something like this. It’s really bad. I don’t know if it used to work better, or maybe it just doesn’t work anymore, but I was shocked at how unresponsive it felt. He’s a strong engineer so I’m hoping it was just incomplete because i’m not sure if i’ll be able to do better than the person who made the networking for S&Box.
Slow everything down
If it turns out that fast movement in S&Box doesn’t work well, I guess we’ll just have to make the game slower?
Things just randomly broke?
At least 2 players encountered a bug where they just couldn’t open doors. They were working fine before, but now they don’t work anymore? Crazy stuff. It’s like the dedicated server starts to die after it’s been going for awhile and things just stop working right.
Maybe the scene needs to switch?
I don’t have enough data yet to really figure this out, but it’s concerning.
The woes of a new engine
Maybe this just comes with the territory of a new game engine. There’s stuff that hasn’t been battle tested yet and no best-practice patterns to rely upon. I might be one of the first people figuring this out. I am quite nervous about hitting a hard obstacle and there being no way around it. What if S&Box can’t handle fast paced competitive shooters?
I hope that Facepunch will have my back if that happens. I doubt they would want their engine to be in such a state. I just hope that if I raise an existential issue that they would address it in a timely.
Next Time
There’s something up with performance, possibly server performance. I need to remove the variable of my computer just not being powerful enough to run the game + a server at the same time.
Next time we do a playtest i’m going to host the server on a dedicated server. Hopefully any of these weird bugs other people occasionally see will happen to me.
Gameplay Footage
I recorded a little bit of footage, check it out!
In this clip we can see me venturing away from my group to go turn the generators on. I eventually make my way to the bathrooms where I encounter another human. Amazingly they don’t kill me out of paranoia/suspicion. Together we kill a handful of aliens and survive until the end of the round.
You can see a few moments of the weird movement/lag i’m referring to near the end of the clip.
Leave a Reply