From local co-op to multiplayer shooter
A coherence case study: Hellfront
Written By Ahti Tamm
Published November 7, 2024
Project Overview
Game type: Top-down online multiplayer shooter with RTS elements.
Client location: Sweden.
Challenge: Implementing online multiplayer on a small budget and tiny team, solving network optimization issues, keeping gameplay crisp and responsive, keeping hosting costs minimal, keeping an online multiplayer game alive permanently.
Solution
Using the coherence SDK for Unity, Skygoblin was able to get a working multiplayer prototype implemented over a single weekend, using just one developer.
Reducing bandwidth requirements
coherence has a number of built-in network optimization features. Some, like delta compression, work out-of-the-box. Others need to be enabled manually. In this case, enabling fixed-point compression led to a 3x drop in bandwidth usage for positioning. But Skygoblin did not stop there. Using coherence’s adjustable sample rate feature, the sample rates for non-player characters were dropped from 20Hz to 2Hz, lowering bandwidth needed by 10x. Usually a drop this big leads to jitter, but Skygoblin’s own bag of tricks combined with coherence’s built-in interpolation led to a result where this is non-perceivable by players.
Online multiplayer with local-game-like responsiveness
Smooth and responsive player characters can make or break an online multiplayer game. In this case the local game ran at 60 fps or game ticks, which was replaced by 20Hz or game ticks for the online version. Usually it leads to a 3x increase in perceived lag. However, enabling coherence’s client-side prediction to boost player character responsiveness and adding a few tweaks, the developer was able to hit a point where the responsiveness of player characters was indistinguishable between local and online modes.
Keeping hosting costs at zero while ensuring the game never goes offline
coherence offers support for 3rd party relay services like Steam Relay, Epic Online Services or Microsoft’s PlayFab Party. These, although not as perfect as a server-based setup, still make quality peer-to-peer multiplayer possible. This makes them an excellent option for small developers who don’t want to shoulder hosting costs. Another benefit of this setup is that as long as the 3rd party relay services stay up, so will your game — a rarity in the era of games going permanently offline and becoming inaccessible.
See Hellfront: Honeymoon on SteamGetting started is completely free
You can install the coherence Unity SDK completely free of charge and begin developing your own multiplayer project right now!