Listen… this is a deep topic. Creating games is hard enough as it is when you’re worrying about a single machine. The moment you want to do that over the internet in an effective way is the moment you’ve tripled the amount of time and work it’s going to take to build your game.
If you want a curated list of articles, tutorials, and libraries that is separate from this page, be sure to check out Awesome Netcode on Github.
To get you started on your journey, here’s some useful articles covering various aspects of netcode design:
- Gaffer On Games: Glenn Feidler is “the networking guy”. His stuff is both high level and detailed and his implementations are usually handrolled C/C++ or in Unity (no Unreal or other engine).
- Gabriel Gambetta: Fast-Paced Multiplayer Client-Server Game Architecture: He has a nice little series covering the high level concepts with illustrations that helps to outline the problems and the general solution around solving them. Here is an implementation in Unity that someone made demonstrating his solution.
- Joe Best-Rotheray’s Blog: A game dev who loves netcode. He’s producing a hand-rolled networked shooter demo using C++ and covers his netcode strategy over several posts. He also has some articles demonstrating how to replicate physics in Unity.
- Riot Games - Peeking into Valorant’s Netcode: Explains how Riot is trying to optimize Valorant’s netcode to reduce peeker’s advantage, prevent cheating, and keep the simulation running smoothly.
- Source SDK Networking: Valve’s own documentation about resolving issues related to netcode latency, cheating, etc.
- Timelines: simplifying the programming of lag compensation for the next generation of networked games: White paper around the theory of managing timings and lag compensation in networked environments. (Still need to read)
- Kehom’s Forge: Site with articles/blog posts around game development (mainly Godot). Has some nice articles about trying to build a netcode project using Godot.
- Explaining how fighting games use delay-based and rollback netcode
- The Poor Man’s Netcode
Or if you prefer videos: