which is fastest?...

BlitzPlus Forums/BlitzPlus Programming/which is fastest?...

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.

I have two ways of drawing a series of repeated images in a particular rectangle of screen

One method is to use a For...Next loop to draw the image at selected intervals from its x_postion to its x_postion+length. And vertically from it's y_position to its y_postition+length, except for the images at the edges where I use DrawImageRect to draw a specified fraction of the image. I will tell the programme only to draw the tiles when they are on the screen.

My other option is to use a Viewport command, and use TileImage to place all the images rpeated inside the Viewport. With some coding, I make sure that the viewport never goes off the screen.

I hope that's been good enough description for you. I'll give examples if I need to, but at the moment I haven't written out the code for both for the same object.

Essentially the question is whether it's faster to use a For...Next loop with repeated DrawImage commands, or to use Viewport and TileImage.

Thanks in advance!