Skip to main content
GameDev.net gamedev.net
🔒 Locked

help with SDL and frame rate

Started by tls284 Jul 12, 2002 at 1:47 PM 1 replies 550+ views
Original Post
tls284
tls284
Hi all, If someone has a pointer to where I can find more information about maximizing framerates for 2D games under SDL, I''d really appreciate it. Otherwise, here is my problem. My game is a 2D RPG, where the hero is always in the middle of the screen and the background scrolls. Thus, it seems I need to blit the entire background each time the character moves. When running 320x240, this is fine and I can get 300 fps, but if I kick it up to 640x480, it drops all the way down to 45 fps. Each game cycle is only calling two blits - the background and the hero sprite. Anway, any advice is appreciated! Ty
baumep
baumep
You gain some speed by converting the surfaces to the display format using SDL_DisplayFormat.
Using RLE acceleration might help too on paletted images.
And 8bit mode may be not so nice but it's still the fastest.


[edited by - baumep on July 12, 2002 4:52:13 PM]
baumep

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.