Update_StandAlone and when it gets executed

Hi there,

Using the SimConnect callback in 2020, we were able to get an execution at the right time, right before the frame is rendered. This gave us the ability to read aircraft data right before the render and adjust some vars on a per-frame basis, vital for custom flight dynamics. In 2024, the SimConnect callback timing is very erratic; the data is always 1+ frame late and often exceeds the timing of the frame itself.

Since Update_StandAlone is now the recommended path to upgrade 2020 standalone WASM module and get rid of the SimConnect per-frame dependency, we’ve been playing with it but we’re having a few issues.

We’re noticing that the data we’re getting for the aircraft via the Var APIs is consistently delayed by one frame, depending on FPS stability, similar to SimConnect but doesn’t seem to exceed the frame duration.

Can you confirm that Update_StandAlone gets executed at a random point in the frame (because all WASM modules now run on their own thread) and is there a way to get an execution at the very end of the frame (on the main thread or right before the render, after all other computations to flight dynamics) just like we had in 2020?

This is vital for our product to operate, and we’re stuck on this right now.

Regards,
Keven

2 Likes

@EPellissier, @FlyingRaccoon any insight?

Thank you!

Hello Keven,

Each frames, Update_StandAlone is executed after sim update (physics, electrical system, …) and before Model behavior update.
It is possible to move this update, but it will move all Wasm updates (gauge update for example). So it may affect other module done in 2024. And moving it just before draw will let less time to execute Wasm update in the frame.

Is it possible to know which data are you accessing/setting which suffers from the delay, for which use-case? And if you have time, is it possible to have a minimal repro of this delay?

Best regards,
Edalyn

Thanks for following up on this. If that’s the case, something needs to be discovered on our side. We’ll come back with our findings!