Graphics refresh - best practise?

BlitzMax Forums/BlitzMax Beginners Area/Graphics refresh - best practise?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

What is the best way to include independant graphic updates in a program? What I mean is I have a main game loop that has a flip and cls and updates the graphics nicely each loop. I then want to include a graphical effect in certain situations - in this case an image that animates in some way (in my case it appears on the screen gets larger and then disappears).

I can get the image to animate in this way in an isolated test case using a loop which redraws the image in each iteration. But this loop has a flip and cls in it. So I can't embed this bit of code in my main program since it causes all of the other graphics on the screen go screwy, as there would now be 2 flips and cls's. I can't just remove this flip, as the special effect doesn't change quickly enough.

So I guess my questions is can I in some way update some of the graphics on the screen without doing anything to any other grapics? Ors it just a case of structuring the code in some way to get this to work - in which case is there some kind of best practise document.

Any help would be much appreciated.