Best SDL image

Started by
6 comments, last by Kitasia 19 years, 7 months ago
What's the best image type to use for large images in game? Large BMPs seem to cause slowdown.
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.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
So instead of having 1 BMP for animation I should seperate them idividually? [looksaround]
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
FTA, my 2D futuristic action MMORPG
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
--Visit the Game Programming Wiki!
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.

Jesus saves ... the rest of you take 2d4 fire damage.

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.
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.

This topic is closed to new replies.

Advertisement