With a 2d rpg I've been working on solo for the last few years, I got a massive FPS increase after setting up multiple surfaces.

I've setup 6 surfaces for the map (Ground layer, Middle layerx2, Simple Sprite Layerx2, Above Layer), 1 surface for the Gui, 3 for Characters and NPC sprites, and 1 extra layer for misc stuff. Middle, Simple Sprite and Character layers have mutliple surfaces for animation.

Originally the Drawer had to loop through the map tiles, sprites, gui, etc and draw each tile graphic every frame. But with multiple surfaces the drawer only loops through everything once and draws to the surfaces, and only again if a specific layer changes, and only that layer gets redrawn.

I also use something like:
DxDraw.Surface.Draw(0,0,rect(offx,offy,screenW+off x,screenH+offy), < Surface >, true);
to only draw what is on screen, with transparency.


..anyway, before multiple surfaces I had a FPS of 12, and now I get 70 FPS , and thats on a 333mhz cpu. The games runs so fast now, I have to have a Sleep(200) in the main loop for it run properly