We can derive the direction from the usually non-zero velocity vector. It is non-zero, because even when you have your ship in space, hit the brakes for a full stop and then hit the pedal again using CTRL+ALT+SPACE it moves “forward” again.
P is the Position and V is the normalized Velocity. Vmin and Vmax = 0.00…1 to 1.0, where 1.0 is the maximum velocity a ship can attain. P1 is the Position after applying V, so P1 = P+(V*100). The further we imagine the ship goes (100 steps in this case), the higher the accuracy will be. After vector subtraction “normalize(P1 - P)” and we have our directional vector.
Velocity is only zero when a ship spawns, which means: When it jumps into a system, or when it gets dumped out of a hold. I wonder what happens when I hit CTRL+ALT+SPACE after a jump…
If you are stationary however on grid anyone warping in will see your ship pointed in a random vector regardless of any previous movement. Certainly heading can be implied but it is a significant project to add it to the server code as an actual item. And to implicitly calculate it requires a lot more maths per ship making for even more performance hit.
No. It is already implemented, otherwise ships could not move at all. You seem to believe that this particular part is what would hinder this from happening the most. It is not. It is already there anyway. The real problems are the fact that ships are constantly auto-rotating when they are shooting (unless the target is stationary, which it will likely not be), combined with the huge amount of additional calculations the CPU would have to do.
what happens to the model of the ship when it moves stops then moves back in the opposite direction. because as far as the server is conserved that ship is already pointed in the opposite direction.
You might want to take your time going through the link I have added above. It might help. I admit, I only had a quick glimpse into it, but the math does not change.
You go full speed, V=1.0
You slow down, V approaches 0.000001
The client cheats and displays a ship rotating.
V goes negative and suddenly the ship moves into the opposite direction.
Having a signed velocity vector is much easier than having it positive and taking care of an unlimited amount of directions and, more importantly, stops. I am at work and I am constantly being interrupted, so this is turning into a mess of constant editting. -.-
I suggest programming it to figure out a proper approach.
You guys have a very good point, from a logical view point the server won’t keep track of which direction your ship is facing only the ships central co-ordinate’s since it has no bearing on actual combat.
either way, there is a point (a rather long one on larger ships) where your ship visually is not pointed the same way the game says it is facing.
not to mentions ships holding still will randomly spin and change their visual alignments and often wind up pointing different directions for different people. you can notice this a lot in mining fleets
there is a window of time larger on ships with low agility where the visual information given to a player does not match the understood situation of the server.
I am nitpicking, I guess, but it is necessary. A point can not be long, because it has no length. A point can only scale. When you talk about a “long point”, you are talking about a line, which is something significantly different.
: - )
As far as I would do it, the server would have zero knowledge about how the client displays the ship. As soon as V goes below zero, the client rotates the ship according to the derived Directional vector. Ships only begin rotating when V hits (or is near) zero. From a server perspecitve there is zero need to actually rotate the ship. If we removed this part, the client would show a ship moving “backwards”.
I have no insight into the code, but that would be the simplest way of doing it, which means it is likely how it is implemented.
Think: The client shows you things the server does not care about, but your brain needs it otherwise it would look shit. : - )
And now I opt out, because the constant switching between tasks (as in: i have to do this, that and writing and thinking) is driving me nuts.
the server and the visual model of the ship would have to match for this idea to work. otherwise you have people believing they are hitting the front/side of a ship when they are hitting the rear
that’s not even the same usage of the word and you really cant critique some one on that and then say a long point would be a line… all lines are of infinite length and as such have no measurable variability between each other. a line can be neither long nor short. what you are thinking of is a line segment.