Pages

Friday, 4 March 2016

It's all coming together

With the sprite update (stub) handlers all in place (cut & paste from the Z80 source) all I needed to do was fill in the handlers for the background objects; walls and arches. The arches are actually reasonably complicated, because they include calculations for adjusting objects that are 'close'. This enables you to, for example, walk through them without requiring pixel-perfect alignment.

Rendering of background objects now spot-on

With most, but not quite all, the logic in place for the arches, and the static adjustments for the walls, it all looks pretty nice now!

Taking a step back for a moment, I think it would be fair to say that much of the framework of the game is actually complete now! A large percentage of the code that remains consists of the sprite update handlers. After that, there's some maths to do collision-detection/object interaction and Z-order rendering of course, but nothing that requires more than what is effectively CPU instruction translation.

As I mentioned in my previous post I can take this one of two ways from here, but I think I'll opt for completing the maths (ie. the framework) so that I can finish off by simply adding sprite update handlers one-by-one. But first I need to (also) extract the foreground objects from the location table, and then get the player walking around so I can change rooms.

UPDATE: The player appears amidst animated sparkles.

No comments:

Post a Comment