Hyperzap 2018 (C64)

Before I start with the history – this is about Hyperzap in its myriad forms rather than just the new 2018 edition just released under the C64CD banner because why not – a quick disclaimer is probably required, my memory is shocking at the best of times and my recollection of dates may well be off by a considerable amount; usually I rely on friends who have a far better recollection of events, but in this particular case there’s nobody I can really ask. This is… frustrating to say the least and means I’ll be a little vague about specific dates, but I’ve tried to at least nail things down to the correct year and will update things should the facts turn out to be different.

I’ve mentioned Hyperzap in the past when talking about Co-Axis, it was the first “complete” assembly language game I ever wrote and started at some point in late 1986; the actual development process took several months because I was literally learning about the C64 as I went, working out features I wanted and then trying to understand the documentation to implement them. The code was written with the venerable Zeus 64 Assembler, the sprites drawn with an editor I was given but can’t remember the name of – the player ship is just a tweak I did of a default sprite included with it but the enemy was drawn from scratch by my friend Simon Probert – and the titles page is a Yak Society demo that was “repurposed” because I had no idea at the time how to rip the music myself.

There was also a Hyperzap 2 which improved on the original a little – some bugs were sorted out, it had a custom character set and there were multicolour sprites this time with the enemies being my own interpretation of the “licker ships” from Jeff Minter’s Iridis Alpha – but, during a coding session at a friend’s house on his C128, the source code was lost when the 1571 disk drive ate it – that was completely my fault and, although a valuable lesson about backing up regularly should have been learnt that day, it sadly wasn’t and came back to bite me on the posterior when working on Co-Axis,

And then there was another incomplete but at least partially preserved attempt to resurrect the original design, done for the sheer hell of it in the early 1990s around the time coding for what would eventually become Warflame was started; it was called Hyperzap ’91 and was essentially a from scratch re-write of the original even down to the hardware-based collisions – Warflame in its original form uses the hardware registers as well – which also added simple Pirates In Hyperspace style movement patterns since that game, along with Kernal’s Chaos, Galax-I-Birds and a few others, was originally an inspiration for Hyperzap.

Fast forward over thirty years from the original to an annoyingly warm bank holiday weekend and yours truly was pondering the mysteries of the universe, the meaning of life and C64 hardware-based sprite collisions. We’ll just have a quick primer for anyone who hasn’t dealt with the collision registers in the past; sprite to sprite and sprite to background collisions are handled by a video register each which both use the bits in their byte to represent the eight sprites. Bits are are set when a collision occurs and, whilst that’s fine for background collisions bar a few caveats, it doesn’t tell the entire story for sprite to sprite impacts. For example, if the lower four bits of the register are set there’s no way to tell from that if there are two separate collisions (and which pair sprites are involved) or if all four are clustered together somewhere.

So what Hyperzap 2018 does is split things in two. It checks the sprite to sprite collisions to see if the player is in trouble and, because the bullet is a software sprite, background collisions can be used to check when nasties have been shot. False positives don’t occur with the starfield because one of the multicolours doesn’t actually trigger sprite to background collisions and the registers are cleared at the top of the frame and checked just before the status bar so that doesn’t accidentally “shoot” enemies either. Being a software sprite also means the bullet can be coloured independently to the hardware sprites and the spaceship uses a second sprite as an overlay so it doesn’t share dark grey with the enemies.

I’ve also added a simpler version of the enemy movement patterns from Pirates In Hyperspace where only the vertical speeds are changed and two enemies will update every five and a bit seconds. It is almost painfully simple stuff for sure, there aren’t many bells or whistles past having a titles page and there’s a fairly obvious fault in the game design which survives almost completely intact from the 1987 original but, considering the bulk of the code took around four hours, I’m quite pleased with the results and it was nice to finally use that Marc Francois tune in something too. The source code is available through good old Github for anyone wanting a prod around and a download is over at the CSDb.

Workprint – May 2018

Yes, I’m a little late with the workprint this month but in my defence there have been things going on; I spent a significant chunk of the weekend in an unexpectedly large van with my stepson Matthew and stepson-in-law Josh, heading to Kent for an overnight stay in order to relocate boxes of old computers and software which have been sat in my dad’s garage for… oh, about sixteen years. Here’s what it looked like after we put everything into the van…

…and no, the large Rupert having a lie down on top of everything wasn’t originally mine but has been adopted anyway. I’ve found myself left with a lot to process – both in the literal sense and emotionally, the latter probably being the harder to deal with – but it’s done and everything is in one place now, although I haven’t had a chance to do any serious ferreting around just yet. I did get a family photo before we left for home by the way, so it wasn’t just pictures of storage boxes!

In programming news there hasn’t been much time of late (or more accurately, the problems I’m having with my shoulder means that sitting in front of a computer for extended periods is at best uncomfortable) but the previously mentioned C64CD project is pretty much done with just little extra polish and some “how it works” style articles required before release – there’s an all-formats retro game development competition I like the look of which might serve as a place to put it out, although I’ll need to check their rules properly beforehand since it’s using some wired graphics – and I’ve been doodling a little here and there when spare moments present themselves.

Old School Demo 1 (PC)

It’s an incredibly poorly kept secret that I love a good DYCP, but the latest Cosine release which includes one wasn’t actually programmed by me for a change! Old School Demo 1‘s name is a subtle, nuanced hint at what it might contain…

…and yes, it has a parallax starfield, Amiga-style colour rolling effects, two scrollers – one with the aforementioned DYCP – and a remix of the Uridium 2 titles tune playing in the background which was done by Jason Page himself. I sort of had a hand in the graphics, aNdy used the Cosine copyright symbol logo I did a while back but reworked it for the PC.

The download includes some handy PureBasic source code as well for those who fancy a dabble and, because aNdy wrote the code in part for folks who wanted to learn their way around said language, it’s been pretty much documented to within an inch of its life.