Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Unity Multiplayer Best option for a physics based flight simulator combat game

Discussion in 'Multiplayer' started by RogueStargun, Nov 1, 2021.

  1. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    242
    I have been developing a single player VR space flight sim over the past year, and all movement in the game is based on rigidbody physics (ie: AI enemies rotate through applying torques to rigidbodies. I'm interested in the long run in building a multiplayer version of this game, but I was wondering about how to handle physics.

    Photon PUN and MLAPI are my potential options.

    I was thinking to handle physics properly, I could merely run all physics authoritatively on the server and broadcast movement information to clients.
    This does feel like it would end up being quite slow, however. Anyone have any particular recommendations on whether this is a bad idea for a fast paced game?
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,972
    As you mentioned PUN: We don't recommend it anymore for new projects. Our new networking solution Fusion is much more effective while achieving more precise results. It now has a release candidate and is being used in various VR projects (with physics interactions) already.
    It's reasonably easy to code with and you won't hit a hard wall late in the project.

    Converting single player games can be a challenge, no matter which solution you pick.

    It's not "slow" to have one authoritative host/server which sends the state to clients. Or put the other way: There is no alternative to this approach. In networking, you always end up sending some updates (state or input) to others.
     
  3. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    242
    Thanks. I'll check out the dragon hunters VR example.
     
    tobiass likes this.