Interesting stuff, looking forward to hearing some sounds coming out of it :o)
It didn't make much sense to me to write a piece last week, as the game was totally broken with nothing to be shown whilst I continued on the re-write of the graphic system. The last few days have been much more positive however, and the game is playable again, and just about back to where it was before the rewrite.
The game now uses a row-based back-buffer rather than a full-screen back-buffer. It's normal for games to use full-screen back buffers as a way to reduce flicking - you draw everything that has changed/moved to this back buffer, and only once that's done is it then copied to the front buffer - i.e. the actual screen. This technique stops you from seeing the screen change as it updates - you don't see half a sprite, or the background being shown where the sprite should be as it hasn't been drawn yet - that's the upside. The downside is that you have to have that entire back buffer in memory - so for a Spectrum that's 6912 bytes. Okay, so you can sometimes drop the colours from that (so -768 bytes = 6144), but it's still a large amount of memory to have to set aside.
What I now have is a much smaller version of that - a back buffer which only covers a single character row of the screen, so 8 pixels high rather than 192, and so 1/24th of the memory. This means however that I have to split everything I draw into groups of 8 pixel high rows, and know which sections to draw when each row is being updated, and that takes time, and some additional memory to make it all work. I also needed to change how some of the graphics were held in memory so they could be used in this way, but luckily I've got a great system setup for creating the graphic data from any image format and to any layout I require, pretty much at the press of a button.
TL:DR - The rewrite has managed to free up about 5K in an area of the game where it was desperately needed, and I'm feeling a bit happier about the progress of the game again. All the graphics are back in, and once I've fixed some corruption to the graphics which is happening *somewhere* in the game (that'll be fun to find!) I'll get that pesky ghost which caused all this trouble in the first place added to the game, and get another video of it out there - and hopefully with some SFX this time to.