Context: All my aircrafts, mounted from Community, flight.
Bug description:
The mouse interation to pull down the menu during flight is stopping the WASM simulation which we run on the MSFS callback PANEL_SERVICE_PRE_DRAW
For context:
MSFS_CALLBACK bool FSRgauge_gauge_callback(FsContext ctx, int service_id, void* pData)
{
switch (service_id)
{
case PANEL_SERVICE_PRE_INSTALL:
{
return true;
}
break;
case PANEL_SERVICE_POST_INSTALL:
{
return FSR_Gauge.Connect();
}
break;
case PANEL_SERVICE_PRE_DRAW:
{
sGaugeDrawData* drawData = static_cast<sGaugeDrawData*>(pData);
return FSR_Gauge.OnUpdate(drawData->dt);
}
break;
case PANEL_SERVICE_PRE_KILL:
{
FSR_Gauge.Kill();
return true;
}
break;
}
return false;
}
So the FSR_Gauge.OnUpdate is being stopped or slowed down when the user reaches for the menu, causing a gap on the WASM simulation.
This will lead to glitches on WASM Rendering and also big issues for airplanes that have custom simulation / physics like A2A and FSReborn airplanes.
As a result of the user reaching to the menu, the parachute physics running in WASM gets interrupted and make the custome flying phycics fail, making it jump… many other concecuences comes from this… FSR500 get glitches with engine simulation, engine EIS variables displays updates, etc.
It’s been like that also in FS 2020. It’s just the new menu widgets are heavier and cause larger stutter on loading, so you notice it more. Especially the complex widgets like camera, weather.
They not only stop wasm, the whole simulation is stopped, you can see it on the terrain below, or if you turn on FPS overlay in devmode.
WASM callbacks are synchronized with the sim frames so when the sim stutters, the delta time between WASM module iterations will increase accordingly.
The best Asobo can do now in such case, is optimize the sim so that such stutters do not occur.
Some damage limitation can probably be done on your side.
It depends on what you are doing in your physics calculations really. (is it simulated at a fixed rate? based on a delta t measured on your side? etc…)
I send simconnect overrides of different variables to achieve results, etc. In the case of the Parachute simulation, lots of variables override regarding flying dynamics such as Z, Y, X acceleration, etc.
The update code is send on each simulation frame at the WASM gauge PANEL_SERVICE_PRE_DRAW
I believe if the stutters are removed I wouldn’t see the issue, we can retest… the challenge here is, if I change the code it can only be from MSFS 2020… so very difficult to test until I do full MSFS 2024 conversions.
I think it would be acceptable at this stage to reduce the stutters and re-address once I do a full conversion towards MSFS 2024, as it is possible you guys have implemented new BRS system I could use alleviating the problem, and regarding other variables overrides for custom simulations we would need to re-test on the next alphas to see if they are affected.
For example, ITT Overrides, NG Overrides, Engine Power Overrides, etc.