Jump to content
  • Advertisement
Sign in to follow this  
doombunny3

Question on SDL and Tile Sheets

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

Alright just a quick question here.

When using SDL and using a tile sheet, when you choose to use only the one tile from the whole sheet for a part of your game, does it have to find memory for the WHOLE tile sheet when your only blitting a small section of it, or does it know to find a space memory for that small section and forget the rest?

Just wondering, i know if so it's probably not that big of a deal but i was just curious.

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure if I understand the question completely, but generally speaking, whether you blit or render an entire image or only a portion of it will not affect how much memory is used.

With software blitting, typically you'd load the tile sheet into memory, and then blit parts of it to the screen as needed; what portions of the tile sheet you actually use won't affect memory consumption.

With hardware-accelerated rendering, the situation is similar, except that the tile sheet will likely be a texture, and what parts are rendered will be determined by the texture coordinates used.

Of course you can load and unload different tile sheets as needed, which may have an effect on how much memory is being used.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!