• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

AI planes with smooth movement - possible?

Interesting

It sure would be nice to have an API to replace the shortcomings of SimConnect. I am not sure that FSUIPC could meet those needs given its capabilites, they seem to target different needs.
FSUIPC is definetly a great piece of work, and SimConnect is not bad, minus several very serious shortcomings.
It would be a monumental piece of work to DMA any software (I have no desire to peek and poke around in memory), including a new version every few years, my hat is off to Dowson for his work on FSUIPC. In the dawning age of 'managed windows' ;) I wonder how long it will be before such software as FS starts relying on managed components, Vista uses managed services etc. Managed code would make it virtually impossible to DMA software, and I would not rely on this method in the future. Personally I love .net/managed code. I know C++/native/win32 and .net/C#, and have programmed both for some time. .Net has come a long way and is VERY powerful, competing with native code in many scenarios now (especially due to optimizations). I use .NET exclusively now, unless I can not get the performance or functionaliy I need and then revert to C++/Native code.
It would be nice if MS finally just did us all justice and opened up the FS franchise, like they said they would in the past.
If there was a comparable consumer sim, with the popularity of MS-FS, then I would be using that flight sim.
I wonder what the plans are for FSXI or whatever it will be called. Will they even use SimConnect? Will the developer API be similar or different? Who knows, makes it kind of difficult to invest resources into developing for MS-FS.
I love MS-FS, and fly it exclusively, I would REALLY like to develop a multiplayer server and client, NOT based on DirectPlay. Hopefully that can happen, maybe ACES will wise up and fix a few of the issues we have, they have got to know about this and other issues.
 
Last edited:
If there was a comparable consumer sim, with the popularity of MS-FS, then I would be using that flight sim.
Have you tried X-Plane 9? That is getting extremely good. If I didn't already own FS and have time and money invested in add-ons, I'd probably be using it exclusively. Then I could happily dump Windows too.

Si
 
A Reply

I tried X-Plane way back in the day, around 2000-2001, and was not impressed, has it improved dramatically? If so thats cool.
However, I love Windows (Vista), Windows and I coexist happily on my pc's ;)
I have LOTS of development time invested in FSX, hopefully FSXI will overcome the shortcomings of FSX.
G
 
X-Plane is indeed an excellent sim. I believe that I read that with the new release some of the scenery building functionality is coming back. The graphics are definetly on par - even better than FS9/X IMHO. I was going to check out the x-plane.org yesterday, but their server was down, and I haven't had a chance to look at the latest and greatest yet....

Ok, so I won't beat my head over the update rate/synching problem with FS/MP. At least I won't waste my time in that direction - when I have so much else to do!
 
FSX Socket Connectivity

New to FSX..

I've seen a few threads on connecting to FSX via sockets but have been looking for examples on how to do this but come up w/ nothing.

I want my client app to be able to send aircraft updates to FSX a few x a second. Which should create the initial aircraft and update its position (lat/lon/alt).

How do I open up FSX to accept these types of request as well as send updates w/o using SimConnect?

Thanks
 
I just did follow this thread, This is a major problem for FSX and not only Ai's plane but any surrounding moving object..
Now this is affect FSX SP2/Accel so what was under FSX "1" that was smooth ? maybe by looking at it we may find a solution because for now it is a complete disaster for FSX accel.
Anyone found a solution yet ? many links on this thread are dead...

Thx
 
I believe that most of the original FSUIPC functions, now internally use Simconnect
Yes, almost all. FSUIPC4 is a compatibility layer, to ease the transition to SimConnect. If the take up of FSX had been all that was hoped there'd be many more direct SimConnect add-ons by now, and FSUIPC would be well on its way to being phased out as an interface. This is why I've really been concentrating on the User Facilities.

Before Simconnect, with direct memory access, the AI smoothness was not a problem
You never actually had control of AI by "direct memory access", surely. Are you thinking more of the multiplayer interface, not AI?

FSUIPC did offer direct access to some of the same facilities MS's TrafficToolBox does -- i.e. the ability to send controls to AI aircraft. It used the same interface TrafficToolbox did. I could do it the same way in FSX (it does already for "Zapping" AI aircraft), but I don't see much point. As far as I know these facilities were only ever used by programs such as AI Smooth, and they were never terribly satisfactory.

Regards

Pete
 
I've been trying for months to get AI planes in my FSHostClient program to move smoothly

I'm surprised no one has mentioned that simconnect (by default) uses the Nagle algorithm for sending packets, so I assume something like this:

<DisableNagle>True</DisableNagle>

in both the simconnect.cfg and simconnect.xml will aliviate (or completely solve) your problem, it DID solve mine with Squackbox and the horrible latency problems I was having.
 
<DisableNagle>True</DisableNagle> in both the simconnect.cfg and simconnect.xml will aliviate (or completely solve) your problem, it DID solve mine with Squackbox and the horrible latency problems I was having.

Hi, and thanks for the reply.

It's an interesting theory, and one that I haven't tried, but I don't think this problem is related to TCP packets. I think it's related to the fact that FSX is updating the local user's plane (or, the local user's view of the outside world as his plane moves forward) and my program is updating the AI plane. Since Simconnect doesn't seem to have a way of syncing those two movements up, I think it's a lost cause.

See my second post in this thread for my thoughts on trying to get the two in sync. One of the things I tried was to update the AI plane each time Simconnect updated the local user's plane (via the VISUAL_FRAME callback), but I believe even that is flawed, since the time between when FSX updates the local user's plane and when FSX calls my callback can vary.

Thanks,
Russell
 
hello my necro buddies - there is a method for smooth AI movement:

another thread in this forum here

The trick is to put the AI aircraft into SLEW mode and send it *velocity* updates, instead of trying to warp it from point to point through space by sending it position updates. Makes sense when you think about it, and this method looks totally smooth even if you send the updates once-per-second.

Having said that the starting point for most FSX programmers is to assume the correct method for AI motion is to send position updates, and they find out it seems to kind-of work at slow update rates as the plane warps from place to place and maybe it will smooth out if you can just send the updates fast enough. It's a tough step to accept the problem is with your algorithm not some failing of FSX or the tcp/ip stack or whatever. But the approach is fundamentally flawed.

But adjusting the position by sending velocity updates is more complicated than sending position updates, whereas sending the position values is trivially simple (but it won't be smooth).

It might be the proper way to control motion would be via acceleration updates (that guarantees continuous velocity changes, in the same way that velocity updates guarantees continuous position changes, and position updates ) - but the slew system in FSX doesn't provide any possibility for that.

And there are significant limitations on what you can do with AI objects in slew mode in FSX (e.g. animations go right out the window) but that just means more programming to fix that (e.g. swap out of slew mode while you animate) so FSX provides an endless opportunity to spend your life programming instead of flying...

B21
 
Hey B21!, nice to see you on this thread...


The trick is to put the AI aircraft into SLEW mode and send it *velocity* updates, instead of trying to warp it from point to point through space by sending it position updates. Makes sense when you think about it, and this method looks totally smooth even if you send the updates once-per-second.


I think it's a very nice technique, and also, think that sending velocities to the AI aircraft is the solution...but also it's important to send position updates in intervals of time, in other words, to reallocate the AI aircraft each interval of time, and between those intervals the SLEW system will "MOVE" the plane...with this it's important to set ROTATION (pitch velocity, bank velocity and heading velocity) and TRANSLATION (in XYZ axes) values to the SLEW system.


It might be the proper way to control motion would be via acceleration updates (that guarantees continuous velocity changes, in the same way that velocity updates guarantees continuous position changes, and position updates ) - but the slew system in FSX doesn't provide any possibility for that.


I think that maybe it would be neccessary to use velocities relative to the plane's body instead of world velocities, since SLEW system's velocities are relative to the plane's position. I realized that maybe body velocities are the same velocities of world velocities, but the difference is that are relative to the plane's body.


And there are significant limitations on what you can do with AI objects in slew mode in FSX (e.g. animations go right out the window) but that just means more programming to fix that (e.g. swap out of slew mode while you animate) so FSX provides an endless opportunity to spend your life programming instead of flying...


Exactly, the bad news of using SLEW is that it doesn't have animations in it...
However, in few experiments i noticed that you can control few things like gears....if you put an AI plane under SLEW and send NOSE GEAR simulation variable with different values...you will see that you can change the position of the landing gear...*EVEN UNDER SLEW*...i think the trick is to send more than one NOSE GEAR values say from 0 (zero) to 100% and you will make your own animation of the landing gears (even under slew mode on an AI)...


Manuel
 
Hey B21!, nice to see you on this thread...

Exactly, the bad news of using SLEW is that it doesn't have animations in it...
However, in few experiments i noticed that you can control few things like gears....if you put an AI plane under SLEW and send NOSE GEAR simulation variable with different values...you will see that you can change the position of the landing gear...*EVEN UNDER SLEW*...i think the trick is to send more than one NOSE GEAR values say from 0 (zero) to 100% and you will make your own animation of the landing gears (even under slew mode on an AI)...


Manuel



Dear Manuel

What is the meaning of Nose Gear?? I have search it on FSX Event key but im not found..?
Or do you have another mean of it??
I have same problem.. when i use 'slew' the plane is cannot make animation about the gear..

Best Regard

Blu
 
With "Nose Gear" i meant the "Center Gear"...this "Simulation Variable":


GEAR CENTER POSITION


When you instruct an AI aircraft to go under SLEW MODE, all animations will be disabled...HOWEVER! there still a chance to "move" the gears, by sending positions (0-100%) every certain interval, to make the "ilusion" that the gears are still moving. In other words, send these "Simulation Variables" with a certain interval of milliseconds (maybe?):


GEAR CENTER POSITION
GEAR LEFT POSITION
GEAR RIGHT POSITION

Since if you set for example 75% for "GEAR CENTER POSITION", you will see that the AI Aircraft will have that gear 75% extended...You can do a test and you will see what i mean....if you make your program to create some kind of "counter" from 0-100% you still have the chance to make a custom or improved animation on the gears...it may not be the same as the original animation..but still you have the chance to "move" the gears...


Manuel
 
With "Nose Gear" i meant the "Center Gear"...this "Simulation Variable":


GEAR CENTER POSITION


When you instruct an AI aircraft to go under SLEW MODE, all animations will be disabled...HOWEVER! there still a chance to "move" the gears, by sending positions (0-100%) every certain interval, to make the "ilusion" that the gears are still moving. In other words, send these "Simulation Variables" with a certain interval of milliseconds (maybe?):


GEAR CENTER POSITION
GEAR LEFT POSITION
GEAR RIGHT POSITION

Since if you set for example 75% for "GEAR CENTER POSITION", you will see that the AI Aircraft will have that gear 75% extended...You can do a test and you will see what i mean....if you make your program to create some kind of "counter" from 0-100% you still have the chance to make a custom or improved animation on the gears...it may not be the same as the original animation..but still you have the chance to "move" the gears...


Manuel

:) Thank you

its works guys
:)
 
Back
Top