For the last demo party of the season, the UK’s very own Sundown, it was back to the Spectrum and another collaboration – with Equinox coming up with the goods on the graphical side. In the end only about half of our ideas actually came to fruition, but I’m pleased to report that the successful ones included the raster scene that I previously billed as “one of the cleverest effects Iâ€™ve ever done” but wound up abandoning to write Haluzkynation instead. The final cut received first place in the Oldskool Demo competition.
- Download Koopaville (TAP, 43Kb)
- Koopaville video (H264 AVI, 9Mb)
- Koopaville on Pouet
- Koopaville on YouTube (dreadful quality, natch)
- Koopaville source (31K – read health warning below!)
Not long after starting the project, it occurred to me that this was to be my first serious full-scale Spectrum demo for more than three years. However, it didn’t take me long to settle back into the Speccy demo coding style, in all its hacky glory… and with these effects being that little bit more complex than anything I’d done before, you can be sure that I used every nasty trick in the book. Reliance on sub-scanline timings (to the extent that it will only work on original 128 / +2 models, and no clones – not even my trusty copy of Fuse was up to the job) … self-modifying code… unrolled loops… stack pointer abuse… and in extreme cases, all of the above at once (i.e. code abusing the stack in a timing-critical way, in the form of an unrolled loop that another bit of code has to step over modifying that code along the way).
Consequently, the link I’ve provided to the source code above is a bit of an empty gesture really. All the layers of micro-optimisation and dynamic rewriting have made it completely unreadable, and undocumentable. I hope I never have to look back on it, and as for anyone else trying, I think you’d have to achieve a zenlike state of enlightenment to get anywhere. In short, it’s the sort of code that I would be truly ashamed of writing, were it not for the fact that those hacks are absolutely, unequivocally required to achieve the end results. Think of it as a Machiavellian tour-de-force, except without the killing people bits.