Jump to content
  • Advertisement
Sign in to follow this  
Jakez

[SDL] loading image or sprite sheets

This topic is 2993 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

Hey everyone.

note: have looked for the answer myself, but couldn't really find what I wanted to know.

I finished lazo foo lessons some time ago, and have made a few games.

My questien is: Does it matter if I don't load all the pictures at the beginning, or should I merge them into one and have sprite sheets?

My logic says that it ofc uses the computers resourses if it once in a while have to load a picture, but it is that big a deal?

But I guees its best to use spirte sheets, since the other can turn into a bad programmering habit? Am I on the right track here? :)

Share this post


Link to post
Share on other sites
Advertisement
I would definitely merge them into sprite sheets, separated by their size. For example, put all 32x32 sprites into one sprite sheet, all 64x64 sprites into another sprite sheet, and so on.

This will make things a bit easier because you will just have to load in a few sprite sheets during initialization, then you won't have to worry about loading anymore images.

Also, sprite sheets make animation much more simple.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!