I’ve been doing a lot of graphic intensive work; moving a mouse pointer in real time, game engine, etc.
I always knew doing a full flush chewed up more time than flushing only the affected regions but let’s really break it down.
Moving the mouse cursor around it’s so slow doing a full flush you can’t even really use it. So I double-buffered it and oh is it snappy.
Next the game engine; that was always double-buffered to assist in scrolling. However, I opted for full flushes every time; figuring w/ the number of objects affected it would be best. NOOO.
Break down of a render loop:
Reset variables, Check Pause Button, Auto Scroll: 0.0006sec
Check Joystick (intensive): 0.0009sec
Move, Animate and 6point collision detect character: 0.002sec
Copy buffer to front: 0.1176sec
Manage 14 enemy animations & movement: 0.0043sec
Calc & Display FPS: 0.0080sec
Full Flush: 0.1088sec
So just doing copy/flush takes 0.2264sec
Everything else combined takes 0.0158sec!
I spend about 20x more cycles just copying and flushing. I’ll let you know what the new numbers are after I’ve had 14 enemies and 1 character copy and flush out only their affected regions.