• Content count

  • Joined

  • Last visited

  1. I ended up fixing the desync issues. I wasn't reapplying inputs that were made after the last server update. A new issue has arose out of this, all normal driving is perfectly smooth, but boosting seems to cause desync. you can see the boost desync here: https://superonroad-wip.herokuapp.com/ At the end of every boost, you'll get rubber banding (WASD to move, space to boost) code: https://github.com/GodsVictory/SuperOnRoad/tree/wip
  2. What am I doing wrong here. Normal movement is fine, but when boost is applied, there is rubber banding at the end. I'm using client/server model to implement movement. pseudo code: Client sends inputs to server Client process inputs and displays locally Server receives inputs and calculates where client should be Server emit client coordinates Client receives update and applies coordinates Client reapply all inputs made after the last server update Player class: https://github.com/GodsVictory/SuperOnRoad/blob/wip/public/js/player.js Server code: https://github.com/GodsVictory/SuperOnRoad/blob/wip/server.js
  3. I am lerping instead of simply overriding. I was just wanting the calculations to be more accurate between the server and client. The more you lerp, the less responsive the controls feel, but the less you lerp, the more choppy movement is.
  4. Currently, when a client moves, the inputs are processed on both the client and the server which use the same calculation to process the movement. When the client receives an update from the server, the servers position will override the clients position. I would hope that the client and the server would calculate the same positions, but that is not the case. I believe timing is the culprit. What is the best practice when syncing movement? Current flow: Source: https://github.com/GodsVictory/SuperOnRoad