• Advertisement
Sign in to follow this  

Best SDL image

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

What's the best image type to use for large images in game? Large BMPs seem to cause slowdown.

Share this post


Link to post
Share on other sites
Advertisement
Large anything is going to cause a slow down... when it is stored in memory, it is all stored with the same format. And that is actually the fastest way, unless your graphics card handles on-the-fly gif deomcpression.

Share this post


Link to post
Share on other sites
So instead of having 1 BMP for animation I should seperate them idividually? [looksaround]

Share this post


Link to post
Share on other sites
i prefer PNG, but thats for size / quality issues, not speed issues.

what exactly are you doing? im guessing your experincing slowness by re-drawing one huge BMP each frame. this is probably normal.

describe exactly what your doing. how many surfaces are in the scene? what size are they, how often do you refresh, and what kind of game are you making and what state is the game in when you see the slowdown? any other info will help

Share this post


Link to post
Share on other sites
If your bitmap is larger than the screen some video cards may have trouble with it. Ie. If you're working at 640x480 and you've got a bitmap that is wider than 640 or taller than 480, you make have trouble. It's best to split it up into smaller, screen-sized images and manually tile them.

But really, why do you need such a huge image?


Ryan

Share this post


Link to post
Share on other sites
Quote:
Original post by AntiGuy
So instead of having 1 BMP for animation I should seperate them idividually? [looksaround]

That's what I do. My animation engine uses an array for all the animation frames (currently sitting at 165 frames in my player animation [grin]).
That's 165 bitmaps, not 1 bitmap with 165 images on it.

Share this post


Link to post
Share on other sites
I hope you've converted the loaded image to the display format. Once you do that, the original format you loaded it from becomes irrelevant.

Share this post


Link to post
Share on other sites
Yeah that was the problem. I can use place 100 hundred enemies now with no slow down but in that case it takes a while to load up.

Share this post


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

  • Advertisement