2D Pixel exp thingi.

BlitzPlus Forums/BlitzPlus Programming/2D Pixel exp thingi.

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.

Nice effect, I don't really much you can do to improve on it, because improvements are usually found in the main code the only thing I spotted was this:

midx=pw/2
midy=ph/2

which can be changed to:

midx=pw shr 1
midy=ph shr 1

bit shifting is faster than using / and *

another thing is (and this won't get you faster code) is that this:

For pixel.pixel = Each pixel
Delete pixel
Next

can be done like this:

delete each pixel

that will do the same thing and is easier.