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

FS2004 Panel / XML Gauge Performance and Optimisation

Messages
206
Country
unitedkingdom
Hi folks,

Not really a gauges question but more to do with panels. However, I guess this is the most appropriate place in the forum for it...

Setup:
2D panel in FS9 with a 'real' resolution of 3840x1200 pixels. This is scaled in the panel cfg for fullscreen output at 5120x1600. My FS9 and windows are set to this resolution (two monitors in EyeFinity).
The panel has two main layers - the primary one has the background bitmap and most of the gauges. The second has a few gauges - two that must always overlay the primary and don't do so very well using only draw_order statements and one windscreen wiper gauge that makes the PFD flicker if it is in the same panel layer!

Symptom:
On Windows XP and a 3840x1600 pixel dual-screen setup this all worked relatively well. Of course there was an FPS penalty for the panel but it was fairly 'constant'. Moving to Windows7 (but same GFX card and same resolution initially) I started to find that there was an oscillation in the FPS and that the outside scenery would stutter / lag while turning when the panel was in view (of course it might also stutter and lag when not turning, but I would not see it so clearly). The view movement is smooth with the panel hidden. Now more recently moving to larger screens the problem is worse, to the extent that I am trying to work out a way to fix it...

So far, I have tried the following:
  • Graphics driver: I'm a bit screwed here since with the exception of the AMD Catalyst 12.11.beta6 driver, all available drivers either crash windows with Firefox (ie 12.10 - it's a known bug) or cause awful flickering of any 2D gauges that contain text or overlayed bitmaps (ie most of them).
  • Optimisation of FS: I am sure this is purely panel related. Testing conducted in the Mojave, where I have no installed scenery whatsoever!
  • Code tidying: Mostly grouping things better, removing duplicate statements and using 's' vars for repeatedly called values. To be honest I have not actually seen any real difference in doing this, apart from spotting a few silly errors in my previous code.
  • Optimising gauge bitmaps: Removing the 'excess' in bitmaps (making them the minimum rectangle to contain the relevant image) and using clip commands in place of masks where I can get away with it. This has apparently helped a bit but still didn't seem to make a huge difference. I also reduced bmps to 256 colour or less where possible.
  • Panel.cfg rearrangement: Moved a load of gauges from the main panel layer into the second one - basically all the 'non visible' xml gauges to control systems etc are now in there with the overlays. The main drawn panel gauges are still in the same layer with the background bitmap. This has actually made a really big difference (more than any of the others)!
Some questions:
  • Is there a special format I should use for the background bitmap?
  • The splitting of a long list of gauges into two layers appeared to give a performance improvement. Is that logical based on the way panels are drawn? I would have thought not but the evidence says otherwise.
  • Is there any known difference in performance between 1) an XML gauge with 1000 lines of code each of which is in it's own element compared to the same code all in one element? 2) Displaying and rotating a bitmap with 10000 pixels compared to 100 bitmaps containing 100 pixels each?
  • If a panel section has a large number of gauges with different update rates, and then those are 'constrained' with a draw_order statement, does that draw order have to happen before the panel can refresh? If this was the case then perhaps my draw_order usage should be minimised.
Any other ideas or advice also appreciated!

Cheers,
Geoff
 
I'm still using XP so can't compare with your problems. However, draw order ie zorder shouldn't I would have thought caused any problems as it just forces panel windows to overlay each other.
The other point you mention about programming of gauges is something I do. I have a "control" gauge that calculates various vars and sends the results to the gauges with bmps. Whether it affects performance I cannot tell. To me breaking down the code in that manner goes towards making xml a little clearer!!!!!
The other point about bmp size is also unclear as to performance. I have quite a few hires bmps of gauges and even hires windows but I don't notice any difference in performance.
vololiberista
 
Last edited:
Interesting about the bmp quality vs performance: I also see no difference. As for zorder, I don't use it bacause it messes up ActiveCamera and I like to do my walk around checks ;) I have rearranged my panel now so that only one draw_order set is needed to make sure the windscreen wiper gauge does not turn off a chunk of my panel lights when running!

Some interesting finds from my recent tests:

I can eliminate* the gauge flicker even with the new Catalyst 13.1 driver which is great since it appears to give better performance wrt to turning stutters... I simply removed the instances where there was an 'update' constraint in a gauge containing overlayed bitmaps! I moved code as appropriate so that script that relied on the timing (6Hz in this case) were not affected.

One gauge still has a slight issue: my EICAS screen flickers if the windscreen wipers are running. This is very confusing since the two gauges are in different panel layers and even then they do not actually overlap! However, since the working windscreen wipers in FS9 are nothing more than a gimmick I can live without them or endure a bit of flickering!

I suppose this must all be an oddity arising between dx9, AMD drivers, vsync and EyeFinity on a silly (large) resolution panel.

* Only tested on the ground (although moving), so I think I will wait to see if the problem is really solved until I have tested some more!

Geoff
 
Scratch that. It does all still flicker in heavy scenery / AI etc - any time the FPS drops a bit then the layered (as in more than one bmp layered in the gauge) flash and flicker :mad:
Back to Catalyst 12.11.beta6

Geoff
 
Back
Top