1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

Update physics world manually for client-side prediction

Discussion in 'Programming' started by ScimitarDD, Feb 11, 2019.

  1. ScimitarDD

    ScimitarDD Member

    Joined:
    May 3, 2018
    Posts:
    19
    Hello!

    I'm currently making a physics based online game (server-client based) using GMS2's Box2D physics. To reduce latency issues I want to implement client-side prediction (setting the physics back to an older state when an update packet from the server arrives at the client and re-simulate physics to the current time frame). The re-simulation part is the problem because GMS2 updates the physics world automatically. Is there a way to manually call the physics update with a given delta value so it's possible to simulate like 5 frames at once (I couldn't find a function like that in GMS2's manual)? Or is there a good workaround for that?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice