Advertisement

Maximize Multiple Blts

Started by April 24, 2001 03:24 PM
0 comments, last by Enix 23 years, 9 months ago
I have a level editor that I have created, yet it draws too slowly. right now, whenever any tile needs to be changed, it is marked as changed in 2 demensional array that represents all the tiles on the screen. then, after all changes to this array have been made, i search through the entire array and look for any tiles marked as needing redrawing, and redraw them. the tiles are 16x16 and thus, if you scroll right just one tile on a 640x480 window, i have to do 30 seperate blts just for the tiles and one entire screen of redrawing means 1200 seperate blts just for the tiles. Does anyone know of a better way to do this blt''ing in a way that won''t hog to much memory and where i can still keep as much of my per-tile redrawing as possible.
This gamedev article is exactly what you want. Basicly, it cuts down the 1200 blits of a full screen redraw to just 4 blits.

But, 30 blits is really fast, you dont loose any speed there. 1200 might be a bit too mach tho



Edited by - Diodor on April 24, 2001 5:45:44 PM

This topic is closed to new replies.

Advertisement