Originally Posted by
dwks
You could try speeding up the rendering a little bit; perhaps the lag won't matter so much if you have a faster frame rate. In terms of the SDL, if you create your video surface with the SDL_HWSURFACE video flag (to try to put the surface in hardware memory), you may get better performance. Double-buffering is quite simple, I believe you just have to initialize it and call SDL_Flip() when you want to swap the double buffers. Also make sure your bitmaps are the right format (using SDL_DisplayFormat or SDL_DisplayFormatAlpha) to match the screen; otherwise the SDL will be converting surfaces on the fly to the right depth-per-pixel, which is very slow!
You can play around with updating only those rects that have changed; I tried this in one project (atlantis, see signature), and it really was more trouble than it's worth in my opinion. If you use double-buffering and a couple of coarse checks so that you don't do silly things like painting six maps on top of each other or painting all one-hundred offscreen sprites simultaneously, computers are fast enough these days that you can redraw the entire screen. As VirtualAce (whom I still think of as Bubba . . .) says, you can create some layers to render say the map to a surface and then blit that surface all at once whenever you need to redraw the screen. Give it a shot, see what happens.