Workprint – July 2018

Things have been a little rough of late with everything being topped off with our thirteen-year-old dog King passing away on the 7th of June – he arrived here at the start of 2005 as a small, six week old bundle of fluff. I haven’t really been in a fit state for much of anything since then – I pretty much kept up with Retro Gamer and tried “powering through” and sticking to my blog schedules but only managed about half of the “planned” posts – and I was even quieter than usual on social media which is something of an achievement I suppose? I’ve just realised whilst writing this that it happened almost a month ago, but I’m still getting the occasional wobble when it would have been his dinner time…

I haven’t done much code since then, but the bulk of what I’ve written during that period has been “busy work” to keep my mind occupied more than anything else. Vallation hasn’t seen any attention because I didn’t dare sit down with anything that complicated where I could easily lose concentration halfway through modifying something important and leave myself with a steaming mess to knock the bugs out of later… I’m perfectly capable of doing things like that often enough as it is without any external encouragement!

One of the distractions was writing a game for the Spectrum for release under the C64CD brand. It’s pretty much done apart from needing quite a bit more level data, but now it’s that close to complete I’m sort of committed to finishing it as an entry for the venerable CSS Crap Game Competition. It’s crap in the sense that it’s incredibly simple as a game and my Z80 is shockingly bad to the point where I’m considering a disclaimer when the source goes up to Github warning people that it’s not there as a “learning tool” unless being used as an example of how things really shouldn’t be done. That doesn’t stop me being almost perversely proud of it for some reason?

Workprint – June 2018

One ongoing project that’s been vexing me a little is the new C64CD game; the problem I’m having is with the name, which is basically six consonants from the latter half of the alphabet slung together pretty much at random which make it, as far as I can tell, unpronounceable. That wouldn’t be a problem except there’s always a chance I’ll need to talk face to face about this thing down the line and having to refer to it as “Thingybob” because I can’t pronounce my own game title would be embarrassing if I had any shame… perhaps I’ll just tell everybody that it’s pronounced “Thingybob”?

Anyway… the weekend saw me prodding around Vallation with the intention being to migrate to the latest version of Char Pad; this was mainly because it supports direct editing of the character set again rather than painting to the tiles, something which kept me away from every version after the first release. This transition would also mean a begrudging upgrade to my cheap and incredibly cheerless map converter which was originally written because the levels are stored as source code with each screen being a converted block of Char Pad map data followed by colour, exit and enemy data.

But on yanking the existing CTM files into the new version of the editor I discovered that the mode Vallation used which assigned thirty two bytes per tile with half of them being attribute data wasn’t supported in this updated Char Pad! Instead there’s an attribute byte per character so, if the byte for character $14 is set to red, every instance will appear in that colour and there has to be a second copy of the character if you want one in purple. But after muttering darkly about this for about half an hour whilst and prodding grumpily at the data, I realised that the bullet had actually been dodged because, apart from the four teleporter characters which ended up getting their own code, the tiles weren’t using more than one colour per character so converting it was actually possible.

It still took a quite few hours of juggling to sort out the existing levels, followed by rewrites to the tile plotters which updated how they handled colour, then some new code allowing each tile set could have a unique attribute table as well but, after three days scratching my head and swearing, for the most part at least all of those changes are invisible because it looks the same as before! On the plus side, there’s over 5K of memory saved on colour data and I can work in a far more comfortable version of Char Pad now, although the map converter was more cheerless than I remembered it being and will need further surgery sooner rather than later.

Thinking about Uridium (C64)

Kim Justice recently posted a video about the just released Hyper Sentinel and its predecessor Uridium – I’ve been playing the former and have a few thoughts, but need to spend a little more time organising them for a post – and I’ve been making something of a nuisance of myself in the comments by, amongst other things, explaining how the background scrolling and parallax starfield work for Uridium on the C64. Whilst writing those comments I ended up coding a simpler version of my own with controls like Hyper Sentinel into the bargain, so I might as well show off demonstrate it here.

Despite the Dreadnought only being 17 character lines high that scroller is actually refreshing 21 lines of the screen from a 256 byte wide map which has been cropped down from Uridium‘s final level where it was 512 wide. The stars work in a similar way to Andrew Braybrook‘s, with two possible characters being displayed (or not if the character cell they’d be occupying as a piece of Dreadnought in it) as high resolution rather than multicolour so the points being plotted to them can cleanly counter whatever the hardware scroll register is currently up to. Braybrook’s stars are randomly placed at the start of each level whilst mine are limited to one every second character line, but it still looks okay and I could at least make it randomise the X positions.

For some reason I even got around to making the Uridimine launchers pulse using what are essentially primitive software sprites which are only being written to the colour RAM, although Rassilon alone knows if that’s how Uridium actually does it. Just for reference, where the border colour is green there’s free processing time and red indicates that my slightly clunky scroll engine is weaving it’s magic; the border also changes to pink whilst playing the music – a cover of Jason Page’s Uridium 2 loading music by Andy Vaisey – but that happens well before the visible screen actually starts so can’t be seen.

I’ve got no plans to continue this right now because it was just a doodle really, but the scroll engine started off as part of something else and the upgrades I made today might end up being passed back to that project… and I’ve literally and rather randomly just realised that what I’ve actually written here is a partial clone of Sensible Software’s Uridibad, haven’t I?!