Search Unity

UNET (Ummorpg) HUGE Lag

Discussion in 'UNet' started by AKComp, Apr 24, 2020.

  1. AKComp

    AKComp

    Joined:
    Aug 22, 2014
    Posts:
    26
    Hello, I'm using linux server for my game's server side. I have a huge problem, but i don't know is caused from server or my game project.

    Every 20-30~ seconds, be a big lag (during 3~ seconds) and after, everything gets normal. I tried it with 16GB service and 1 GB service, there is no different. And also i tested my game with 300 player yesterday, it is so same with 1 player. So, 1 player or 300 is not changes anything.

    1 Player is send and recieve 180~ packets during 30 seconds, and i think it is not big value for a server.

    This is Profiler Netwrok Operations:
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You should update uMMORPG to the latest version.
    It hasn't used UNET for 3 years now :)
     
    AKComp and Joe-Censored like this.
  3. AKComp

    AKComp

    Joined:
    Aug 22, 2014
    Posts:
    26
    Hey, i changed almost everything on ummorpg. and not in addons, main scripts such as Player.cs etc. If am i update the ummorpg, will be any problems on project or my game?

    thanks
     
  4. AKComp

    AKComp

    Joined:
    Aug 22, 2014
    Posts:
    26
    Hello again, if is it work, using "Mirror" on networking side, I can update my project compatible with Mirror. Or anything you suggest. I can't update my MMORPG because, almost everything changed and i think im using very early version of your asset.

    And I wrote very complicated game, which has 30k fans alredy. Yesterday, I opened my game for test, there was +1k ccu. I'm working for 3 years on this game :D
     
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    In that case keep your uMMORPG version, but try to use Mirror at least.
    It brings hundreds of bug fixes and performance improvements over UNET :)
     
    AKComp likes this.
  6. AKComp

    AKComp

    Joined:
    Aug 22, 2014
    Posts:
    26
    I'm again. There is a problem to upgrading Unet to Mirror like; No overload for method 'AddPlayer' takes 2 arguments

    AddPlayer function can't have an Extra message but I need it for character index, is there an any way?
     
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It's easiest if you use exactly the Mirror version that I use in latest uMMORPG. and then compare AddPlayer etc. with latest uMMORPG to see how to do it :)
     
  8. AKComp

    AKComp

    Joined:
    Aug 22, 2014
    Posts:
    26
    Hey, i compared and solve this problem, but there is a problem too on my game, CastTimeRemaining() is 0 on the server but, on client side, it is always changing number such as 14.599-13.657...... Why is it?

    Thanks.

    EDIT: I found source of this error, NetworkTime on the server side and client side are not equal, how to synchronise that?

    LAST EDIT: Okey, I forget delete old NetworkTime.cs. Now it works but I have new error on handle of equipment;

    "No overload for 'OnEquipmentChanged' matches delegate 'SyncList<ItemSlot>.SyncListChanged'"

    LASTLASTLAST EDIT: Okey I Changed it with add new parameters that "ItemSlot new,ItemSlot,old"
     
    Last edited: May 3, 2020