A first-person action 5v5 PvP FPS, similar to Capture the Flag. Players move faster when invading enemy territory, and become stronger in combat when defending. I was responsible for networking, movement, and UI.
The networking is built using Unity’s Lobbies for matchmaking and Netcode for GameObjects for replication. This allowed us to develop without having to worry about dedicated servers for development or for publishing.
I built the networking around movement first, which uses rollback to maximize accuracy and keep combat stable even in poor network conditions. This was guided by the GDC talks for Overwatch’s networking. All clients (including the host) keep a copy of the last good state as well as all subsequent unverified states. While this makes long rollbacks fast, we realized it does not allow for easy extension as we were implementing melee and projectile attacks.
To hide when rollbacks occur, tracked objects apply visual smoothing that is a combination of look-ahead and exponential decay. When only velocity moves the object, the visual will perfectly match its target, but when displacement occurs, it will gradually get smoothed out. This can be suppressed for intentional teleportation, such as when a player dies.
Combined with the hub-and-spoke network topology, rollback also let us implement a basic host-authoritative anticheat. When a client sends a physics frame, the host can choose to accept it or reject if it is outside an accepted tolerance. When rejecting a frame the anticheat can choose whether to overwrite position and velocity separately, so most of the time this doesn’t cause any noticeable difference. This could also conceivably be shifted into a distributed anticheat for a point-to-point topology.
UI and game state
Three UI elements exist to quickly communicate game state: Kill feed, announcement banners, and score counter.
The kill feed is built for subject-verb-object format, such as “Player A [stabs] Player B”, or “Player B [stabs], [pushes off ledge] Player A”, or the occasional “Player A [captures flag]”. Actions are highlighted for players that participated in them to provide additional positive feedback and satisfaction.
The announcement banner is reserved for information players absolutely should not miss. It can display arbitrary text (such as who scored), and is used primarily to mark the beginning and end of a round.
The score counter is static for most of the match, but animates at the end of a round when a team scores. This combines with the kill feed, announcement banners, and some slowmo to ensure players cannot miss this.