Hi all!
scott wrote:[...] its like there is no smooth interpolation as they move (But that has been for as long as I can remember, with all versions of ca3de. I just assumed it was how the game was coded and you just hadn't worked on it because you were too busy with the engine)
Yes, that summarizes it pretty well.
The reason for the stuttering is that the server is running at only 20 FPS. That means that it updates its world state only every 1/20th second (you can even see how the FPS is affected every 1/20th second when you set
showGraphs=true). After each update, the changes are sent to the client, which in turn just updates its local world representation accordingly. This happens even in single-player mode, which happens to establish a full networking game that is just limited to the local machine.
Therefore, all server-side controlled objects are affected by the "20 FPS stuttering".
For the local player, this is compensated for by
prediction, which takes player input and processes it immediately while the input is also sent to the server. The details of the prediction technique are fairly complicated, but it makes sure that the players movement is responsive and free of lag at 99% of the time (in single player mode even at 100%).
For everything else that is controlled by the server, the only option is to "hide" the 20 FPS updates by interpolating and extrapolating the related data. Although that can cause tiny visual errors, it is usually neglectable and in fact the only option to augment the FPS to that of the client.
So, well, you're right: Even though that interpolation stuff is not inherently difficult, I've just never found the time to implement it. This is also because Ca3DE had so few movable objects in the past. As this is going to change rapidly now, I'll also address this problem soon.
This is also because you'll find the stuttering even worse when it affects also the player, which in turn happens whenever something occurs that the prediction cannot account for. For example, riding an elevator up causes the player to be pushed up by the server. The prediction knows nothing about this up movement, thus cannot compensate for it, and thus the first persons view is affected by the stuttering.
Similar though unrelated things happen when the player walks up a step of a staircase.
I'll look into it soon.
Thrawn wrote:Other question: Is there a frameblocker in Ca3DE. For some strang reason I can't get over 60 frames, no matter what I do with dynamic lights etc, I all the time only have 59.xx frames.
May I guess that you also have a LCD/TFT screen (not a CRT)?
This sounds like the classical symptom of v-sync being enabled: As Scott already mentioned, you have probably set "
Vertical Synchronization (v-sync)" to "on" or "application controlled" in your driver settings. Just turning it off should solve the problem. As usual, the Wikipedia has more information in this regard:
http://en.wikipedia.org/wiki/Vertical_synchronization