I posted this issued on stackoverflow a couple of weeks ago and still need help with it. I'm hoping to use flutter for a windows desktop game but my experiments show some janking in a very pared back game loop . The question on stackoverflow includes example code for flutter, for flutter using the flame package, and for a javascript version. The javascript version runs perfectly smoothly but the two flutter versions don't and I can't figure out if the reason is something in my code or something in the flutter framework. Any help would be much appreciated.https://stackoverflow.com/questions/65066393/flutter-desktop-custom-game-loop-appears-to-drop-frames
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/f2a879d6-93b8-422d-8190-21e04efd1b76n%40googlegroups.com.
I did not know how to implement your suggestion of using a Flutter AnimationController and a Stack with a Positioned Image
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/141a013c-db10-4946-94c6-63d48a76cf42n%40googlegroups.com.
Thanks Stefan. There is something interesting here. The code from the video is at codepen. It runs beautifully smoothly. But if I remove the line c.drawPaint(Paint()..color=Color(0)); then it runs with a lag. This is what is said in the video as well. It is hard to understand because Color(0) is transparent so shouldn't have any effect in a newly created canvas.
When I build the code for Windows Desktop it runs the same regardless of whether that line is in or out, but not as smoothly as it does in the browser.
30p and 60p: frame rate used in particular in the United States and Japan on TV channels and camcorders, in countries which used the NTSC system in analog. But this rate is in fact also very present in all the countries of the world, on the computer equipment which is often produced by countries which inherit the NTSC, we therefore also find this rate everywhere in the world on the screens of PCs, smartphones, tablets, and as a standard for video games.
|
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/9cc7307f-c05a-4f54-a3c3-164cc5d19e4fn%40googlegroups.com.