Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

2DFighting network : Point me in the right direction

Discussion in 'Multiplayer' started by rXp, Nov 4, 2016.

  1. rXp

    rXp

    Joined:
    Sep 24, 2013
    Posts:
    8
    Hello,

    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.

    Best regards,

    rXp
     
  2. srylain

    srylain

    Joined:
    Sep 5, 2013
    Posts:
    159
    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.
     
  3. rXp

    rXp

    Joined:
    Sep 24, 2013
    Posts:
    8
    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.