Table of Contents

Introduction

Backdash is a multiplayer network SDK to help you implement Rollback Netcode on your game.

It started as .NET port of the first rollback netcode SDK GGPO (written in C++) to be used in any game engine that uses C#, F# or any .NET dialect as scripting language (Godot, Monogame, Stride3D, etc). Dispensing with the need to create native builds and native binds to the C++ GGPO code.

And also adding more options for configuration and extensibility.

Warning

⚠️ This library is not able to run on Unity until they finish the CoreCLR port, check:

How Does It Work?

Rollback networking is designed to be integrated into a fully deterministic peer-to-peer engine. With full determinism, the game is guaranteed to play out the same way on all player's computers if we simply feed them the same inputs. One way to achieve this is to exchange inputs for all players over the network, only executing a frame of gameplay logic when all players have received all the inputs from their peers. This often results in sluggish, unresponsive gameplay. The longer it takes to get inputs over the network, the slower the game becomes.

In rollback networking, the game logic is allowed to proceed with just the inputs from the local player. If the remote inputs have not yet arrived when it's time to execute a frame, the networking code will predict what it expects the remote players to do based on previously seen inputs. Since there's no waiting, the game feels just as responsive as it does offline. When those inputs finally arrive over the network, they can be compared to the ones that were predicted earlier. If they differ, the game can be re-simulated from the point of divergence to the current visible frame.

Don't worry if that sounds like a headache. Backdash was designed specifically to implement the rollback algorithms and low-level networking logic in a way that's easy to integrate into your existing game loop. If you simply implement the functionality to save your game state, load it back up, and execute a frame of game state without rendering its outcome, Backdash can take care of the rest.

Learning resources

More information about how it works and why it is good: