Search Unity

Physics and Networking

Discussion in 'Multiplayer' started by reset, Jun 11, 2009.

  1. reset

    reset

    Joined:
    May 22, 2009
    Posts:
    393
    Hi

    Is it possible to create a network physics game in a non-authoriative setup - or must all the physics be computed by the server and sent out to the clients as in an authoriative setup?

    thanks
     
  2. shaun

    shaun

    Joined:
    Mar 23, 2007
    Posts:
    728
    We have implemented a networked physics solution whereby the client locally solves the physics simulation in a non-deterministic manner. It's quite tricky though, and we're still tweaking it 6 months down the track. If you don't care about accuracy of the simulation across all clients, or are willing to accept snapping from hard syncs, then you could get away with a simple solution.

    Best regards
    Shaun
     
  3. Veli

    Veli

    Joined:
    Mar 10, 2009
    Posts:
    301
    I thought about this a bit as well.

    I thought of making a simple script that adds a networkview that observes nothing to an colliding object on runtime.

    Then this colliding object send out and RPC containing all basically the velocitycetor and rotation-velocity (cant say torque here for obvious reasons :p). Received RPC then moves this object around on all clients (and server).

    When the physicobject then goes to sleep, it would remove netwrokview.

    Or something like that :p