• 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.

simulation performance

Messages
118
Country
israel
Hi,

I wonder if this code to set var5 as RPM every 5 secconds will affect simulation performans (FPS of stutters)

<Element id="Element">
<Select id="Select">
<Expression id="Expression">
<Script>
(P:Local Time,seconds) 5 % 4.8 &gt;
if{
(A:General eng rpm:1,RPM) (&gt;G:Var5) }
</Script>
</Expression>
</Select>
</Element>
 
That block of code would typically execute 18.2 times per second so in short, I would find that idea impossible to accept as fact.
 
This code work perfect for me.
But I don't know if the fact I set new value to var5 every 5 sec
will affect FPS in some computers
 
Let me put it this way....you could safely start setting that variable to a new value up to 1000 times a second (if XML would let you go that far) and you would have no noticable impact on framerates. The only time performance starts becoming an issue is in graphics where you have variable counts going into the 100 000s or even the millions. And additional processing for each of the 3-4 color channels in each pixel. And then you have a lot of those images.

Setting a single 64bit floating point local variable isnt even peanuts for your computer. I wouldnt worry too much about performance for a few single variables in XML....
 
Last edited:
I agree, setting XML variable values is almost frame rate free. The thing you have to watch for are triggering K: events continuously - not only will this affect the frame rate, but it also breaks any multi-keystroke commands (like engine and door commands).
 
Back
Top