Demo Factory 2018 (C64)

Okay, so between writing the first draft of Saturday’s post rambling about the development of Demo Factory and actually pushing it out to the world I found myself pondering ways to rework it and… well, sort of accidentally wrote a complete, upgraded version! Demo Factory 2018 has been through a few iterations since that first build, but the final code was finished in the early hours of this morning. The music this time is from the game Ninja Rabbits and was composed by Sean Connolly, whilst the general layout of the screen was based on the original 1976 release with some tweaks to add new features. After that, everything else was pretty much built from scratch.

In some respects at least this version works in the same way as the original Demo Factory, relying on the C64’s hardware-based sprite to background priority register for the disks – that’s why one of the character multicolours is black in both versions, those parts of the graphics can never have a higher priority than the sprites so the moving floppies are actually passing in front of those parts of the background – but the sprite-based part of the scroller has to work differently, with the left hand character being a sprite that’s being masked in software so it can pass behind the black part of the pipe regardless of the letter’s current colour.

Although there’s one highlighted effect running in the box labelled “VFX” there are also two starfield-like routines, the animating “SFX” cone and a couple of other, smaller elements which are mostly being refreshed every frame – the moving arrows are shifted every second frame because they don’t look as pretty moving faster and things like flashing lights change only when needed – and that lot are all handled with either character redefinition or simply changing the screen or colour RAM. The only hardware sprites in use are the eight floppies which are either on or sitting by the lower conveyor, the last three characters of the scroller as it falls from the upper belt and one expanded sprite which displays the character that’s just about to appear for the scroll.

I did consider saving Demo Factory 2018 for the CSDb intro competition if it happens this year – the highest byte of memory used is $3FFF since the upper and lower borders are open and the ghostbyte needed to be zeroed so the code is small enough and it does technically feature a logo – but it feels more appropriate to put it out now alongside my fevered ramblings about the original. The source code has been cleaned up and can be squinted at courtesy of GitHub for those who might be so inclined.

Workprint – September 2018

I spent the previous weekend visiting family dahn sarf and, after a particularly harrowing coach trip home, had to spend a few days “recovering” so this post is a bit later than expected… on the plus side, I picked up a copy of Compute’s First Book Of Atari Graphics from the lovely folks at Level Up in Canterbury…

…which I hope is not too advanced for me! It even came with a hand-written page – poking out of the book in the picture above – of display lists as decimal from a previous owner which seems to have been used as a bookmark since it’s a few pages into the chapter titled Introduction To Player/Missile Graphics, one of the few places where the display list isn’t particularly relevant.

Sorry, drifted off a little there… so I’ve been working on the project I’m still not really talking about, although it’s probably safe to say I’ve been a little lazy recently; the intro is done and there’s two complete parts still waiting to be linked, but I haven’t found the time for a prolonged coding session to get any of that done and it’s one of those jobs I don’t want to stop halfway through for fear of losing my place. I also have a list of potential ideas which is coming along nicely and a couple of existing prototypes which can be improved and re-purposed so stuff is still happening.

I did find a couple of hours to doodle some code whilst away though; an interesting thread at the Plus/4 World forums mentioned using the registers $FF1A and $FF1B to scroll a bitmapped screen around in a form similar to AGSP on the C64 except without the “dead air” at the top of the screen, so I spent some time experimenting to get my head around it. The code I wrote works but this method only affects the bitmap itself so colour data would need to be moved by brute force, a bit of an ask considering the Plus/4 uses 2K for bitmapped graphics regardless of mode. It’s something to experiment with later, although I’m seeing an odd, almost FLI-like glitch in the version I wrote which added splits for a character-based scrolling message and can’t think for the life of me why it’d be there!

Workprint – September 2017

The lack of releases means this blog has been even quieter than usual… but things continue to happen in the background. For example, the rewrite of the Hex Files is still in the “exploratory stage” as I settle on an assembler and IDE to target, rethink the running order and actually start doing a bit of writing. CBM prg Studio initially looked promising but I really didn’t like the way it converts tabs to spaces in the source code; I’m used to whizzing around with the cursor keys so it feels somewhat stodgy. A few other options have popped up (feel free to insert a Finbarr Saunders reference here both for “popped up” and “insert”) so I’ll have to see if they feel any more comfortable.

Last month’s post also received a slightly less than subtle comment about Vallation. I forgot to mention it in said post, but it was the first piece of game code I started prodding around and a few changes have been made. The problem is that they’re not exciting enough to write about, essentially boiling down to just reorganising the memory layout to shift all of the graphics from bank 1 to bank 3 which makes space for extra level data required to expand the game out. At the moment this is all pretty much irrelevant until the end of game code is properly repurposed to act as an end of world event (each world is planned to be three levels sharing a graphical theme and, hopefully, some bespoke enemies) because it still stops after the original three levels unless I remove the checks, in which case the player instead gets deliberately stuck on the first screen of level 5’s map because it’s not done yet!