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.

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.

6 Responses to “Koopaville”

  1. Matthew,

    Thoroughly impressed with this demo of course, and thanks for the greet – AND coming to the party. Many people talked to me about the demo and your understated skills in general.

    I hope the buzz is still there for you!



  2. F6 says:

    Haha, so we can await a Pentagon timed version in trd, squeezed to onefile :) But really, a good demo is this.

  3. matt says:

    F6: I’ll be very, very surprised if someone bothers to make a Pentagon build of this… I’m not sure if it’s even possible on the Pentagon without completely rewriting it from the beginning :-)

  4. psndcj//tbk says:

    Respect to Gasman!!!
    Please look at http://zx.pk.ru/attachment.php?attachmentid=3981 and say what-you-think-now =)
    I make THIS without your sources, STS forever =)

  5. [...] This was my 256-byte intro for raww.orgy 2007, and it’s a slightly lazy production, this one. Back in October I was pleasantly surprised to find that one of my core effects for Koopaville boiled down to a 64-byte routine plus 4K of tables, so I did the obvious thing and filed it under “things to crunch down to 256 bytes and recycle as an intro”. [...]

Leave a Reply