Sign in to follow this  

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

This topic is 4198 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 :).

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

This topic is 4198 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this