[SDL] Animation Performance: 1 Image file Vs. Multiple files

Started by
2 comments, last by SigmaX 17 years, 10 months ago
I have a question about which method is better (performance wise). Creating 1 image file with all of your frames of animation. Or using multiple images that you flip between. Is one of these methods faster than the other? Thanks!
-)------ Ed
Advertisement
I would imagine that it would be cheaper and easier to have all your animations in one file.

This way, you only have to load one (1) file per erm...character, and you can load them in a uniform manner. Personally, I would go for having one file containing all the animations.
hippopotomonstrosesquippedaliophobia- the fear of big words
Either way, you're blitting a rectangular area from one surface into a rectangular area on another surface. Unless you're doing something silly, like loading it from the file every time you need to use it, it's pretty much the same thing. Having it all in one file is better for bookkeeping :).
Thanks for the replies so far. This is the answer I was hoping for. Having 1 file with all the frames of animation seems to be the better way to go. There appears to be no impact on performance, and the space savings this will create are encouraging. Thanks you ! [smile]
-)------ Ed

This topic is closed to new replies.

Advertisement