Search Unity

[Discussion] Fighting Game Networking

Discussion in 'Multiplayer' started by iPickle, Aug 8, 2018.

  1. iPickle

    iPickle

    Joined:
    Oct 21, 2013
    Posts:
    46
    Hi everyone!

    I was wondering for a while now, how would you approach networking for a fighting game?
    A first person shooter is pretty straight forward, but for FPS where the exact frame in the animation actually matters for the hit, block or whatever, I'm kind of confused...
    How would you handle syncing the animations, hit detection, combos, etc...

    A few problems I had in mind:
    • If you only sync input, clients might get our of sync, and network delay may break the combo at a remote client
    • If you try and sync the animation, how can you predict blocking or hitting for the other player?
    • Input delay feels very bad for a fighting game
    • Lock state seems to be to slow (?) for a a fast paced fighting game
    Please feel free to tell me I`m completely wrong on my assumptions, I would love to hear an explanation why
    And I would love to hear how you approached this on your projects

    Thanks!
     
  2. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Fighting games are networked using a deterministic simulation which can rollback and predict the local simulation state at will. Then you only need to replicate input between players and deal with some other minor things like the clients synchronizing their time with each other.