I'd like to try the second one fpr this time, but I'm not quite sure how it will turn out. So I'd like to ask you if you got some experience with this kind of problem or if there is a different way that I don't see.
Heck yes, I do. This was tedious, but fun.
I think first of all its important to note 2 things: 1) I have in no way perfected this and am just speaking from the point of view of someone who's tried around with a few of these problems bfore. 2) I would always make sure to differentiate between the different game types and weapon types when speaking about where to handle them.
For example: Counterstrike uses a very different method from what CSiS uses and both work, simply because the games are so different.
I think your game comes closer to the CSiS-approach.
How I do things in my code:
My player-movement code is client-side. This means all other players predict and interpolate ship movement: They keep accelerating/decelerating with the same acceleration/deceleration (also done for rotation) and so they get pretty close to the position. If they messed up on a position (for instance when the client started accelerating shortly after the last update) then there's interpolation: The other clients don't let the ship jump, instead during the until the next update, they move a little faster/slower (I think I actually spread it out over a few updates to make it smoother).
This works very well because the movement is so fast you don't notice it when a player is off by a little.
Rockets move similar to these players, except that they always fly at the same speed.
When client A shoots a rocket, client A creates it on all other clients. But the rocket is not placed at the same place on all clients, instead it's placed to the position where each client thinks that client A currently is. This will make sure the rockets look like they're coming from the client's launchers.
Each client then receives a global pointer from client A which points at the targeted entity. So each rocket knows where it's going, and each client makes it rotate and fly towards the target. The server handles the rocket's collison and also sends movement updates to make sure the rocket stays on track on the other PCs. Whenever the movement is off, I, again, add to the movement the difference of the position the rocket is at and where it should be at to make up for the wrong positioning. Note that I never try to reach the position that was sent. But when I notice "I should be .1 quant further along the x-axis" then during the next wait for an update, it uses vector(.1*time_step, 0, 0) as the c_move's absolute vector, in addition to the current position. This makes sure that the rocket is on the right course at all times, will hit the player on all clients, will not make sudden moves, and will still be synchronized pretty exactly with the other clients.
Uhg, I hope I was good enough on explaining that. Maybe I need to draw pictures
Shots are handled differently. When a client shoots, a "I am now shooting" event is sent to the server, and the server creates the projectiles. This is not instant-hit beams, but fast unguided projectiles. The client sends along the position at which he is aiming, and then the server traces from the client position (the postion of the client on the server) to the position at which the client aimed. So this is a mixture between client-position (aimed at) a and server-position (where the server thinks the client is). Then the projectiles get created by the server on all other clients. All clients then position the projectiles where they think the client currently is (at his guns) and rotate them into the direction towards the position he's aiming at (which was sent along).
The beam guns are handled differently yet again: The server traces from the position he thinks the client is at to the position the client is aiming at and traces. He sends back the position of impact and then all clients show the effect from where they think the client is to the position of impact.
That's how I do it, I'm sure there's better methods, but in the past two years or so, no one has ever complained about lag or bad precision.
As far as I know, modern shooters (anything starting at the time of counterstrike) do step-back calculations: They calculate (beforehand) how high is the ping to the shooting player is. Then they move the players back by that much and then trace the shot. Crazy, calculation-wise, and I think you'll probably only need it for first-person shooters... Darkinferno has done some research on this, but I don't remember where the links are he showed me
Or was it Adoado? Someone showed me papers on how valve did it.
Sorry, lots of text. But you asked
Edit: I see you already found the article, good!