+ 2
Is it a bad practice to use self made threads for a javaFX game loop instead of using AnimationTimer ?
Most people use self made threads for swing but in javaFX they use AnimationTimer. Why is that so ? Will there be any performance issues if I use self made threads for a game loop in javaFX instead of using AnimationTimer ?
4 Réponses
+ 2
Hello darkorbit17493
The way I see it, you had to build your own threads because there was no other option for swing.
I don't think there will be any difference in performance, but you will certainly save work if you use AnimationTimer.
+ 2
Not sure if this thread could be helpful: https://stackoverflow.com/questions/70544317/is-it-a-bad-practise-to-use-create-my-own-threads-for-a-javafx-game-loop-instead
+ 1
darkorbit17493
Sorry 😂
But there is not much material about your topic.
This article seems to be interesting: https://netopyr.com/2012/06/14/using-the-javafx-animationtimer/
You can use AnimationTimer also for other stuff, not only for animations.
I think it is worth taking a closer look at this class.
0
That's my thread in stack overflow XD