Uno.Samples
Uno.Samples copied to clipboard
[PongWars][iOS/Android] Delay not updated properly
[I can only reproduce it for Android and iOS] So basically to repro the issue you need to push to the maximum speed and then try to reduce the speed and you can notice that the speed/delay is not updated properly.
-
Android
-
iOS
Originally posted by @agneszitte in https://github.com/unoplatform/Uno.Samples/issues/684#issuecomment-2111213141
This is actually due to the fact that UI thread is jammed, it needs to catch-up and unstack the list of pending "frame" already prepared before we can see the new delay applied.
Basically "frames" are prepared out of the UI thread and stacked for the UI Thread to render them. When delay between frames is long enough, UI thread will be able to render them at the same speed, but if the delay is smaller than the time spent by the UI thread to process a frame, then they frames stacked and we then have to wait for the UI thread to process all of them before actually seeing the change in the delay.
For me this is a limitation of the model: MVUX is not designed to be a game engine, we could patch it by making sure that the "game engine" does not generate a new frame before the UI thread has been able to process previous one ... but as this is only just a "fun sample" I don't think it's really an issue that we should work on.