Pages

Friday, 14 October 2022

Thousands of lines down, thousands more to go...

Today was a day of waiting around and fortunately I had my laptop with me so I got quite a bit of work done on Xevious. Still churning through the code and slowly discovering not only new things, but old mistakes/assumptions I had made. But progress has been good.

My understanding of the function of the various object tables is firming up as I complete the handlers for more and more objects. There is some AI (difficulty) logic that has revealed itself as well. Quite a few "objects" in the SUB CPU table are in fact placeholders for AI/difficulty parameters that change as you progress through the levels. Pretty clever way to do it, and easy to tweak during development. More on this in a later blog.

Oh and the placement of the bonus flags is (in theory) pseudo-random, but it is designed not to appear too close to the Solvalou. So I'd imagine the trend for each of them to appear on one side or the other is probably related to the pattern of (ground-based) enemies leading up to them!?!

The (active) object table is divided into sections and dictates limitations on the number of various elements of the game. These limits include; 14 ground-based enemies (note that some take multiple object entries, eg. Boza Logram (Dome Array) takes 5), 16 Bacura (indestructible rotating shields), 3 Solvalou shots, 19 enemy bullets and (only) 6 airborne enemies.

The game also only uses half the number of available hardware sprites (64/128)!

The amount of code to comment in the MAIN CPU is a bit daunting when I look at what I've done, and what else needs to be done. Not surprisingly the bulk of the code is handling the various objects in the game; I think I've commented the rest of it already. Last time I checked the listing was some 21,000 lines, but that still contains a lot of single-byte data storage that I haven't compacted yet.

EDIT: I've just checked and there's about 11,000 lines in the listing that is ROM code/data.

I've only got a few ground-based enemies left to RE, including what I think will be the most interesting (and complicated) - the Domogram (Slider). I'm keen to know if the movements are pre-programmed (as I suspect), or follow the background map...

The code for airborne enemies still eludes me, though that's because their appearance in the game is driven by AI logic (and probably some randomness) rather than appearing on a map. That code is going to be the most challenging I fear.

Onwards!

No comments:

Post a Comment