Search Unity

Third Party Photon visible lag

Discussion in 'Multiplayer' started by kqmdjc8, Mar 1, 2019.

  1. kqmdjc8

    kqmdjc8

    Joined:
    Jan 3, 2019
    Posts:
    102
    Hello, I'm not that "fluent" in programming. As I read, PUN2 doesn't use any kind of host, so please imagine:

    ClientA shoots ClientB(projectiles are slow enough to be easily visible). On ClientA screen - projectiles hit ClientB, but on ClientB screen - projectiles are being shown with latency, so he sees random flying projectiles disappearing in the air while loosing health?

    I'm not expert, just a newbie and wondering if it is worth to start Photon for this project.
     
  2. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    If you're intending for clients to always be on the same LAN, then something other than Photon will be better; Mirror, Bolt, SmartFoxServer for example (there are more). This is because Photon always transmits data via its cloud servers which introduces lag, even for players on the same LAN.

    If however, your clients are likely to be playing across the internet then you'll need to implement some kind of lag compensation code anyway, so Photon will be as good in that respect as any other.

    You may want to bear in mind that the Photon staff themselves say that Photon PUN isn't designed for fast paced FPS games.
     
  3. kqmdjc8

    kqmdjc8

    Joined:
    Jan 3, 2019
    Posts:
    102

    Here is some test footage from game. I am on entry level of programming. Won't photon be just okay for this moment? I meant players across internet, not LAN
     
  4. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    If it's not LAN only, then whatever you go with you'll need to implement some kind of lag compensation to deal with the issue mentioned in your opening post. I can't give specific advice, but there's plenty of articles available from Google search that discuss the various methods you can employ.

    If you can get it to work as you want, then it's suitable regardless of what anyone else says. Having said that, I think the main issue with PUN and fast paced FPS is the 500 msg/sec per room limit, it can be hard to stay under that with more than 3/4 clients per room and still send enough updates to avoid visual sync issues.
     
  5. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,068
    For shooters, I would recommend using Photon Bolt. It's giving you more structure, some FPS-related features and the network updates are being composed for you, so you have to worry less.
    Check out the docs for Bolt, too.