Search Unity

Realtime physics game on network?

Discussion in 'Multiplayer' started by kanth0917, Jul 30, 2019.

  1. kanth0917

    kanth0917

    Joined:
    Sep 22, 2017
    Posts:
    11
    Hi, I'm fairly new to online multiplayer games. I have a working local couch multiplayer game that's similar to bumper cars, where players try to push each other out of the arena. Naturally, physics-based collision between players is a core aspect of the game. I've tried implementing PUN for online multiplayer, but due to players being out of sync with the server, I'm seeing some weird behaviors like "ghost" collisions from lag. I've looked at things like lag compensation and prediction, but I'm starting to doubt if those methods help in my case, since those methods are bound to introduce input disparities and small dispositions that result in non-deterministic collision outcomes. What would be the smart way to overcome this issue?
     
  2. MrHaribo

    MrHaribo

    Joined:
    Aug 9, 2012
    Posts:
    16
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It really depends on your game what the right approach should be. Some games can get away with disabling all colliders on the clients and just syncing the transforms/rigidbodies for example, while others need a completely different approach.