Which method is better?

Blitz3D Forums/Blitz3D Beginners Area/Which method is better?

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.

The code example above doesn't particularly use any graphics memory (apart from the standard buffers), because you don't load or create any images. So you don't need to free any images.

Having said that, you will get faster code if you create a small number of images of the colors used (blue, red, green, orange etc) and then select them at random.

Also, Blitz will clear up everything when it exits.

You can simplify your code (and probably make it a little faster) by using Rand() in place of Int(Rnd()), as it equates to the same thing.