Working on the CRPG and fixing bugs has been rather like fighting HYDRA lately… cut off one head, and two more take its place!
I decided to convert my item and spell lists to use bit-delimited strings to save some space and bring it more in line with how I was managing in-game text. Quest items and trap names are still in fixed size buffers because I would have to create a word-size look-up table to convert them, and the byte savings would be minimal at best. Maybe later…
I definitely have to be more careful now with swapping memory pages. For example, the transactions and the item names are in separate pages, so accessing the latter means losing the former, temporarily. So in some cases I copy data into a temporary workspace so I don’t have to page-switch in the midst of another operation.
At times I’ve wished I could swap memory pages into the cartridge RAM area at >6000 to >7FFF, but that would make the game require a SuperCart. (An Editor/Assembler cartridge with at least one 8K RAM bank.) It’s not necessary and I like that the game can auto-load from Extended BASIC.
I also re-wrote my Effects engine into something less platform. In practice the original design worked, but I kept having small regression errors creep in as I tested new things. So I just made each effect a separate function, with some copious recycling and re-use. It takes up about the same amount of space, and it’s much faster too.
I feel like I’m making progress though. I need to make sure the item and inventory systems are fully functional. I also need to test every mob type, which includes traps and doors still. After that, I should be able to pick back up combat engine work.