I am making a 2D fighting game and the multiplayer part needs to be solid.
I am used to do network stuff directly with low level socket or with UE4 but I never did it in Unity.
I don’t want synchronized position etc I need to implement a GGPO system and for that I only want to send the input of the players.
There won’t be any dedicated server and both player will sends the input to the other that will then know what to display.
The big issue with this is delay, to fix that I need to predict what the player will do and rollback if the predication was wrong.
So now, how would you advise me to do this with Unity ? I “just” need to send input/synchronize the input list, verify if the prediction was right and rollback where needed if it was wrong.
I looked at the “simple network game example” and it has some useful things but I need total control but I don’t know where to look.
You don’t need to use UNET, you can use other libraries like Lidgren or Photon for a few examples. UNET just does a lot of the connecting stuff for you, and an easy way to send data to all clients and the server by way of Commands and RPCs.
I haven’t looked into implementing something like GGPO (no idea if it’s open source or available to look at), but given that lots of games use it I’m sure there’s quite a few topics on how to implement something like it.
Well the code not free but you should be able to find the details of how it works. But I can’t find a way to get the code since the official website is down and I want to find the complete explanation which is not easy.
I think I have a lot of the parts ready (like a history of inputs with timestamp) but even thought I got a pretty good idea how to start I want to know everything to not stumble onto big issues.