[FP10] GPU-accelerated sprite engine
http://www.birchlabs.co.uk/Tower.html
Was wondering what Tower Defense would be like with a hundred times more enemies, so I started work on a more flexible sprite-pusher. Invasion's one required manually pre-made sprite sheets, and all coordinate adjustments had to be done by hand.
In my new engine, however, all I have to do is punch in a movie clip and it does all the work for me - it makes the assumption that I want it to rotate around the centre, then fills arrays with all permutations of angle (choosing to render every 5º), frame, and symbol. It does all of this rendering in parallel rather than putting them into a queue, and temporarily (and sneakily) bumps the framerate up to 120 to help the pre-rendering along on faster computers.
It's a bit slower than Invasion's engine (this hits 30 fps at about 3,000 sprites, whereas Invasion - with troops off - could keep up 30 fps with at least 7,000 arrows). I'm attributing this to the fact that the manually-handled spritesheets meant I was able to forego a few thousand array lookups every frame.
However, the special thing about this is that... _in theory_, it's using GPU acceleration ("gpu" wmode). Doesn't appear to exist on my iMac (figures ¬_¬), but do any of you get a green box and a nice speed boost on that page?