sprite sheet vs flip book
jmartine_1026 at yahoo.com
Sun Aug 12 18:52:29 PDT 2012
In my project I animate objects by flipping through ImageView's inside a Parent. Basically I have png's of a walking unit at each frame. The png's get loaded at init and stored as Image objects. I even tried flipping through Image objects (instead of the ImageView), and did not notice any diff in performance.
On a java game site I noticed a post touting sprite sheets over flip booking. In JFX do you suspect it is better to use a sprite sheet, where the viewPort is changed to animate an ImageView, versus what I'm doing?
In my limited understanding of what goes on behind the scenes I imagine that this might not have any difference at all as there is still all these images (or one great big image) still in memory. And that JFX would still render the scene the same way. I guess what it might come down to is the difference in amount of processing needed to edit a viewPort versus swapping an Image (inside an ImageView) or an ImageView (inside a parent).
I figure let me ask first, in case there is a general consensus, before going through the work of testing it out. And even if I test it out I might not notice a diff but Joe Schmoe on 6 year old hardware might. Any insight would be appreciated.
More information about the openjfx-dev