FSHostClient for FSX > FSHostClient for FSX

Sticky: Jittery-Jerky planes in formation flying

<< < (2/2)

Russell Gilbert:
Hi guys,

Well, it's been just over a year since my last post about this, so it's probably time I updated everyone on the status of this problem.  It's not good, I'm afraid.  :(

I believe the main cause of the problem is SimConnect, which is the new system that Microsoft forced us all to switch our programs to when FSX came out.  Instead of using the multiplayer system that the last few versions of FS had used, they removed the multiplayer SDK (developer system, for programmers like me) completely and made us build our own multiplayer system in each of our programs, so they could use the GameSpy multiplayer system instead (which is proprietary, and completely closed-off to us).

Just to give you an idea of the impact of that, think about how the multiplayer system works in FS2004 and FS2002...  Two players are flying next to each other, and sending each other location updates.  Each player's FS uses the location updates to draw a fake plane in the other player's location to represent them.  That's why you see the other player's plane flying next to you -- your FS is drawing a fake plane there, and keeping it moving according to the location updates it's getting from that player.  And if the other player doesn't send an update for a while, your FS keeps moving the fake plane in the same direction it was moving in the last update, so when it finally does get another location update, the fake plane is pretty close to the correct position and it doesn't look like the fake plane is jumping around each time it gets an update.  The important thing here is that FS is keeping the fake plane moving automatically.

FSX has the ability to keep fake planes moving automatically too, but unfortunately that part of FSX was never designed to be used in a 3rd party multiplayer system (like with FSHost), so it's not an option for us multiplayer programmers.  Microsoft told us all that we had to build our own multiplayer system, and keep the fake planes moving ourselves by jumping them forward a little bit at a time, several times per second.  If we do it fast enough, and if our predictions are correct for where the fake plane should be according to the last known positions, then it looks smooth.  But the plane is essentially sitting still in the sky, like it's in slew mode, and then we hop it forward a little bit each time.  If the hops are fast and short enough, it's ok.

The problem seems to be related to the fact that FSX is moving your local plane, but FSHostClient is moving the fake plane.  In previous versions of FS, the sim itself was moving both, so it could keep the movements in sync.  Now the programs like FSHostClient have to move the fake planes using SimConnect, but SimConnect doesn't give us any way to keep our movements of the fake plane in sync with the movements of the local player's plane.  The result is that the two planes are constantly out of sync, and if they're both moving, the fake plane always looks like it's jumping forward and backward.  It's not really jumping backward, it's just that in the small amount of time between hops when the fake plane is frozen still, your local plane might hop a bit forward, so from your point of view the fake plane appears to be hopping backward.  Since they're not in sync, they always appear to be moving forward or backward relative to one another.  And as you may have noticed, if your plane is sitting still on the ground, the fake plane flies perfectly smooth -- that's because only one plane is moving, so we don't have the problem keeping the two movements in sync.

I posted a message about all of this on the FSDeveloper forums several months ago, challenging anyone to show me an example of this type of movement working with SimConnect.  Several of the top FS developers posted replies, and some tried various methods of fixing the problem, but nobody has yet figured out how to make it work.  My only hope is that the next version of FS will work better in the multiplayer environment.

You're welcome to read my two posts on the other forum (posts 1 and 7 in the thread), as well as the other programmers' replies.



Wow, I read a lot of those posts about this topic and went cross-eyed trying to understand it. I am seriously impressed by the effort that you, Russell, and the other programmers have put into trying to resolve this problem.

I would like to make one comment: I don't think Microsoft are on top of the problem either. If I do an instant replay in FSX (best seen in the last two minutes when landing) and use the 'exterior position view' to watch the plane then it will jump around (mainly backwards and forwards) like another player's plane when using FSHostClient. However, if I use the 'tower view' then the plane is really smooth.

This seems to indicate to me that FSX itself has a problem when the viewpoint is moving at the same time as a 'plane' is moving and so FSX is not correctly predicting where the plane should be. Not wanting to point fingers but just maybe the problem is in FSX and not in FSHostClient.

Yes Wheelie, I agree.
 The problem is definatly in FSX.
I've tried several Recorder programs and the playback is very smooth unlike the FSX positioning.

When in FSX viewing from outside the plane, the jumping around in the exterior view is the viewpoint jumping around.  If you change to locked spot view, the jumping around will stop.

Hi Russell.

Russell, now that Lockheed has taken over FSX..... Now Prepar3D v2.1, is there anything more you can do with FSHost Client ??


[0] Message Index

[*] Previous page

Go to full version