Rollback P2P Mulitplayer for Versus Game
LowHikeGames
$38.49
$54.99
30%OFF
(no ratings)
Jump AssetStore
This package adds rollback netcode to Unity, the same approach used in GGPO and most modern fighting games. Each player's game runs without waiting for the other player's inputs. If an input arrives late and doesn't match what was predicted, the game goes back a few frames and replays them with the correct input.For rollback to work, both machines need to get the exact same result from the simulation. Unity's built-in physics can't guarantee that, so I wrote a 2D physics engine using fixed-point math. It's set up like Rigidbody2D and the usual colliders, and there's a converter for existing scenes.The package also handles input delay, time sync, desync detection, disconnects, rematches and replays. You can connect players directly over UDP, or through Unity Relay if they're behind a router. There's also a network simulator so you can test with lag and packet loss.It comes with two samples: a small fighting game for testing rollback between two instances, and a physics sandbox. There are guides that explain how to take a local 2-player game online.It only supports 1v1, and your gameplay code has to use the included physics and math to stay in sync.






