Physics

I tried to use physics to make the game more lively and interesting. Fully physics based movement makes your design to actually matter. You can feel the weight of your ship and any loosed ship part wont go unnoticed.

Each non-player object is not a static one nand affected by physics too, and this is where complexity comes in the networked part of the game.

I think that for multiplayer games it’s rather unusual to use physics not only to handle collisions, but also to predict movement of objects in the network on the client side.

My solution was to make custom movement prediction method, in which after i receive current position data on clients i calculate predicted position and rotation, that should happen not now, but when next sync event occurs, and make physics to adjust angular and tangential velocity the way, the ship will be in that calculated position and rotation when next sync event occurs. This way it provides very accurate results, and makes movement and rotation very smooth even with unreliable connection.