Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Lag adjustment and authorative model for bullet hell (Like Geometry Wars)

Discussion in 'Multiplayer' started by Todiloo, Aug 2, 2021.

  1. Todiloo

    Todiloo

    Joined:
    Jan 22, 2016
    Posts:
    53
    I am making "bullet hell " game like Neon Wars (2d, physics based controls, lots of bullets). How should one approach the authorative model and lag compensation.

    I initiallythought server authorative. It works well for movement as you apply forces so it's an inbuilt inertia.

    However don't the user expect shots to be fired as soon as a weapon is fired instead of waiting for a roundtrip?

    How should I then sync the bullets. I guess syncing their positions is impossible due to the high amount ?
    Do I need someone to lag compensate so it looks the same in each client?

    The game is both PvP and PvE if that matters and using Mirror.

    Anyone have ideas?
     
  2. DungDajHjep

    DungDajHjep

    Joined:
    Mar 25, 2015
    Posts:
    201
    Prediction, i think so
     
    Joe-Censored likes this.
  3. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    83
    You can check out my blog as it might be useful: https://forum.unity.com/threads/creating-an-isometric-2d-rpg-mmo-ongoing-series.998851/

    For my game I move the character right away in unity and the reconcile with the server when the server position get returned to the client. The key here is to make sure the client and server update on the same tick so the the movements are exact which will help prevent rubber banding/popping client side. Also make sure your physics both client/server is exactly the same or you are going to end up with some drifting.

    For my project I'm doing a console authoritative server but the same principles should apply.