Archived

This topic is now archived and is closed to further replies.

deakin

blitting tiles

Recommended Posts

Can anyone tell me what is a faster methods for blitting tiles in a simple tile engine: creating an offscreen surface for each tile and blitting them, or creating an offscreen surface for all the tiles and then just blitting the right rects from it? Or are they both the same? Thanks, - Daniel

Share this post


Link to post
Share on other sites
The performance will be the same... even if you have a surface for every tile, you''re still blitting "a rect" from it to your destination surface. That is, as long as you don''t have 5 million tiny surfaces!

I choose to put all my tiles onto one (or maybe a few, based on family or whatever) surfaces. It''s easier to organize them that way.

Share this post


Link to post
Share on other sites
Try using compiled sprites. Just create a little tool that coverts bitmaps (or whatever) into code that can be loaded by your program. In my old DOS tile engine it increased speed 4x.

JoeMont001@aol.com

Share this post


Link to post
Share on other sites