We have been doing a lot of research checking file access, memory footprint, and found several issues that, if improved, could potentially provide big benefits to the sim smoothness and the dreaded stuttering issue which seems to affect so many users but it’s so difficult to pinpoint. While not every stutter is caused by these, some surely are, and are a result of the way the simulator loads airports and/or .bgl files in general.
First, the loading ranges of the .bgl itself. While the .bgl format seems to allow boundaries set in the .bgl header, they seems to not be used. The SDK compiler seems to always set a fixed boundary, but even manually setting the header to a smaller area doesn’t seem to work in the sim. Maybe the compiler doesn’t support it because the sim doesn’t use it…
This has some consequences because of the following fixed behaviours:
-
Terraforming rectangles/polygons/heightmaps seems to always load at qmid level 11, from ALL .bgl that happens to be in loading range so, each and every terraforming item that belongs to every airport will get loaded. There’s seems to be a cap at 100km, but if you have a lot of airports all using Terraforming, you can easily have thousands of terraforming items loaded at once. Sometimes terraforming items can come from unsuspected places: we found the stock “glider world” packages includes a lot of them, in addition to those found on stock airports, not all of them use them but some do, usually the bespoke ones, like LSZA for example. So, before you are adding any add-on, you are already dealing with lots of terraforming items loaded in a 100km range (at most).
-
Vector placement it’s even worse: seems that polygons are at qmid 11, but lines are loaded at qmid 9, not sure if there’s also a cap to 100km for both levels but in general, it means that if you have lots of airports using these features, they will force the sim to load a lot of elements
These elements are extremely heavy on performances, but you must have many of them in range to realize it, so you would need lots of extra airports, which I guess makes it difficult to replicate for the team, but it explains why some users seems to be more affected than others: it depends how many airports they have installed, and how many use these features and in which quantity.
I understand this might not be a quick fix, because it starts from the very foundation how the simulator loads the scenery, some possible solutions might be:
-
Honoring the .BGL boundaries which are provided in the binary format, but not used by the compiler. Maybe the compiler could just create an automatic boundary based on the objects extents but, of course, it won’t help if the sim won’t use it.
-
Have the sim loading the vector stuff (terraforming, polygons, etc) in smaller qmids, ideally automatically based on the airport boundaries.
-
Adding some range tags in those categories, to let developers give the compiler some hints how far away that item is supposed to be seen from. But usually these features are only required for local touch-ups and in fact, especially for terraforming, you don’t usually want an airport touch-up to affect much outside its perimeter anyway.
Those are just ideas but, it would help if you could give this a look, because we might be losing some optimization opportunity here.