images to images

BlitzMax Forums/BlitzMax Programming/images to images

Soo.... you have your backbuffer with a background on it , and you have these things moving around in the foreground and when they die you want to stamp them in place permanently on the background so you don't have to draw them. Right? And presumably you are drawing the whole background as an image each frame.

In the old days you could keep the background image and just save off the areas underneath the moving objects which is later restored, saving having to redraw the whole background. But that's not exactly how they do things these days.

If you could use a custom flip routine which copies the backbuffer to the front buffer rather than rotate which buffer is used, you could keep your backbuffer as an image and just stamp down the permanent objects onto it, but then of course you'd need to protect it from the moving objects.

You might be surprised just how many objects you can draw per frame these days. The GPU is usually especially fast at drawing image data. You could probably try just drawing everything, all the background, all the dead objects and all the live objects every frame and not have a problem. That will also let you animate the dead objects.