Game Networking Weekly #8
Riot Direct Gateway Steering, Rematch Network Next, and TeamSpec Godot Netcode
Fixing the Internet for Real-Time Applications: Part III Wayback
Peyton discusses measuring latency, packet loss, and jitter, and using software-driven routing on commodity hardware.
Fortunately, somehow we found the space to take a step back … Riot now spends less on internet access and internet facing networking than ever before, and we have better performance across the board.
Boy there’s a lesson, and a difficult one in this AI accelerated world. Sometimes you need the space to think and understand a problem instead of just rushing headlong into the next available “solution”.
Our approach to improving this situation has been to build a system of “gateways” that allow us to steer traffic destined for our network in the appropriate direction at the earliest possible point (where we peer with ISPs), and then “pin” that traffic so that it returns exactly the same way.
We saw this same idea of keeping traffic on a symmetric path in Leveling Up Networking For A Multi-game Future.
[In the] output from our latency analysis tool - you can see several events that affect the player experience. In the future, we hope to mitigate such events automatically.
I wonder if they ever achieved their goal.
Game Networking Weekly was created under Riot Games’ “Legal Jibber Jabber” policy using assets owned by Riot Games. Riot Games does not endorse or sponsor this project. Riot Games policy
Dev Blog | Network Next Wayback
You may recall Rematch from Dev Blog - Netcode 2.0 & Next Beta, where Sloclap talked about rewriting its netcode. About a year earlier, the studio wrote about deploying Network Next to compare the direct path with alternate relay routes for each player in real time.
Sloclap reported routing about 20% of players through the network accelerator at any given time. They gave examples of round-trip latency falling by anywhere from 15 ms to 500 ms where. However it wasn’t a universal win for all players. Players with good (sub 50 ms) connections didn’t really benefit, and even players with bad connections may not find a faster route.
Sloclap showed that a smaller studio can ship per-player path selection using an existing routing service. Network Next deployed a dedicated backend and relay network for Rematch, but Sloclap’s cost for that deployment remains undisclosed. I’d expect it is a heck of a lot cheaper than building your own backbone à la Riot Direct though.
TeamSpec's Networking Architecture Wayback
After trying Godot’s built-in multiplayer tools, TeamSpec adopted the netfox networking library. They liked its ideas but found the implementation, written in pure GDScript, too slow for the game they wanted to make. So they rewrote the performance-critical pieces in C++ one at a time. Their architecture largely follows the Source engine’s networking model: snapshots, client prediction, rollback reconciliation, interpolation, and lag compensation.
The author argues that Godot’s built-in netcode isn’t suitable for a real-time action game. A part of their agument is subjective taste. They dislike scattering is_server() checks through the code. But they make a more grounded technical point about MultiplayerSynchronizer, which lacks the tick-level state needed for client-side prediction and reconciliation. And since the host character goes through shortcut code paths different from those of remote characters it can lead to different behavior and create problems for match integrity in a competitive setting.
TeamSpec went so far as to run separate client and server scene trees on separate threads when a player hosts a game. Bots and the host player go through the same simulation code as remote players.
Interestingly, clients do no local simulation for other players; they do pure pose interpolation.
What TeamSpec doesn’t do yet is leave out characters you can’t see: every snapshot carries every character.
They have no network PVS filtering yet, which leaves the door wide open for wall-hacking to become a serious issue if the game takes off.
The article is packed full of little nuggets and I could go on covering more of them. But just go read it. It’s well-written, and the progression from the early implementation to where the game is now makes a lot of sense.