Hello everyone, I'm currently making multiplayer racing game using bullet physics engine.
The process of updating player position in my game is..
- Update and simulate client side physics engine independently, and just send key input to server.
- Server receive key input and update world, simulate server side physic engine, and send position to all players every one second.
- Client gets new position of all players. If current position of player and the new position differ a lot, correct player's position using interpolation. (interpolating speed is faster than game time)
The problem is that the other players doesn't change vehicle components. Player controlled by user keeps getting key input and changing vehicle components and apply it to physics world, so no problem.
There's no way that client knows changes of vehicle components of other players.. so it will be just stopped most of the time, and moves(interpolate position) only when packet arrives.
So how do I can update other player position? Should I interpolate slowly for other players and makes it move all the time or consider sending vehicle component through network when player pressed key?