Blitting speeds

Just a question for others who may be further along than I am in a SDL
game project.

I’m shooting for an 800x600 window/fullscreen display with a 640x480
playable area at 16bpp.

The idea is, the 640x480 part will be updated at “game speed”, while the
rest of the display is interactive menu areas which isn’t updated nearly
as often.

Should the SDL_BlitSurface() function be fast enough for me, or will I
need to create an optimized blitter? Of course, I’ll do my own testing
for speed, I just wanted other opinions or experiences.—
In a situation like this, is it better to just do an SDL_UpdateRect() on
the 640x480 part, or are their further optimizations that might make a
full screen update better than just updating the smaller area? (maybe due
to optimized page-flipping in SDL itself)

The two primary platforms will be Linux and Windoze. So the
speed on those two platforms would be of primary concern.

Thanks for your suggestions,

Brian Hayward

I had some issues with blit speed, and ended up writing my own blit. The
alpha blits take a lot of time in SDL, but the rest are top notch. I am
running quite well in an 800x600 with the SDL blits. It is an isometric
overhead RPG, and is starting to look good. With dynamic lighting turned off
and using SDL’s key blits it runs around 15 Fps on a non-MMX P200. This looks
rather smooth. I run at 16 Bpp.

When I use SDL’s alpha capabilities to do dynamic lighting it slows down to
just over 1 fps. This is why I ended up writing my own blits.

As a note, I can’t get SDL 1.0 to run under Redhat 6.1, Redhat 5.2, or
Solaris. It either segfaults or tells me no displays are available…

James Best

hayward at slothmud.org wrote:> Just a question for others who may be further along than I am in a SDL

game project.

I’m shooting for an 800x600 window/fullscreen display with a 640x480
playable area at 16bpp.

The idea is, the 640x480 part will be updated at “game speed”, while the
rest of the display is interactive menu areas which isn’t updated nearly
as often.

Should the SDL_BlitSurface() function be fast enough for me, or will I
need to create an optimized blitter? Of course, I’ll do my own testing
for speed, I just wanted other opinions or experiences.


In a situation like this, is it better to just do an SDL_UpdateRect() on
the 640x480 part, or are their further optimizations that might make a
full screen update better than just updating the smaller area? (maybe due
to optimized page-flipping in SDL itself)

The two primary platforms will be Linux and Windoze. So the
speed on those two platforms would be of primary concern.

Thanks for your suggestions,

Brian Hayward