After a swelteringly hot couple of months I've managed to complete my first machine code ZX81 game. It's one I've written before, firstly in JavaScript and then C+SDL and I have improved the engine by animating the fill with greater resolution; ironic considering the ZX81's display is 32x24! The only major change I had to make was to the board size: reduced from 10x10 to 8x8.
Pipe pieces are placed using a cursor and so I've designed the menus to operate using the same system. What you can't see from the screenshots below is that I've implemented a random transitional fade between screens which often gives the appearance of morphing.
The engine -- written from scratch -- abstracts the keyboard hardware by maintaining an event generating and queuing subsystem which supports per-action key repeating, event polling and user event pushing (similar to SDL). Some useful functions include blink_register/unregister that manage blinking parts of the screen, and string_write that accepts embedded formatting characters for source data compression/expansion and write position direction. These things I have carefully constructed to be reusable and to speed-up further game development.

PipePanic is part of the sz81 project and can be downloaded here
.
Comments 