Linus Åkesson wins The Underhanded C Contest.
Heater.
Posts: 21,230
Linus Åkesson, creator of at least one awesome graphics demo for the Propeller has won this years Underhand C Contest.
http://www.underhanded-c.org/#winner
Sorry I don't have a link to his Propeller demo(s) (Turbulence was it called?) but a search of YouTube will find videos of it.
Well done Linus.
http://www.underhanded-c.org/#winner
Sorry I don't have a link to his Propeller demo(s) (Turbulence was it called?) but a search of YouTube will find videos of it.
Well done Linus.
Comments
http://www.linusakesson.net/scene/turbulence/
Linus is awesome.
OK, Linus' Turbulence demo would be very hard for me to do even with 4 BASIC Stamps and an unlimited amount of plywood and relays.
The checkerboard cylinder part makes me think that it would be quite possible to make a game like the special zone in Sonic 2, and the mountain scene makes me think one could make a flight simulator.
It's all smoke and mirrors. That code is written to do exactly what it does, in the program it is in, and nothing else. It is operating on the edge of the machines ability. Optimized like crazy. It is in no way usable for more general purpose use, like in games and such.
Whilst you are seeing a rendering of a 3D object quite possibly that is not what it is. It could just be some funky algorithm that produces that illusion. And that illusion only.
Which is not to say some juicy lessons could not be learned from it for other purposes.
Did Linus post his source code some place? You could look and see how it's done.
Linus released code here:
http://www.linusakesson.net/scene/turbulence/source.php
The mountain scene (voxelscape.s) actually does 3d projection, but it cheats by only calculating the highest point in each column and then filling down from there. It uses Perlin noise to generate the terrain. I didn't see any code to rotate the camera, though.
The smoke part (smoke.s and viewsmoke.s) actually uses velocity and density fields.
The tunnel part (ztunnel.s) actually uses 3d projection. There is a z and a theta loop. It cheats slightly, in that the curvature is parabolic and not circular. It cheats less than the renderer for the Sonic 2 Special Stage does: Turbulence draws it at relatively high, if not full, framerate, while Sonic draws the 3D background (which is basically the bottom half of Turbulence's tunnel) using a coroutine at a lower resolution (half?) and framerate (~5fps).