Here's a summary of how the game works. As an introduction I know nothing about the ZX Spectrum architecture and don’t know Z80 code so this was never going to be a direct conversion and is rather my take on it. An annotated disassembly of the original is available at https://github.com/Ritchie333/deathchase
The main engine is based on a trick to simulate perspective. Basically, each tree has a distance from the front of the screen. This references a lookup table that says whether the tree should move. So trees on the back row only the very edge trees move whereas the from row everything but the very centre tree moves. All the trees are shifted left or right with player movement. As the spectrum has an attribute based screen colour system the trees and sprites are moved in character aligned blocks.
My implementation is slightly different from the original version but follows the same principals. So the entire tree movement from back to front is simply done with pre-calculated lookup tables for whether it moves left/right, where the bottom is and how tall the tree and leaves are and how wide trees are. I took the decision to use mode 5 (or a reduced width version at least) because each frame requires a considerable amount of drawing to the screen and having a 10K screen means that this is faster. This also allows me to do double buffering to allow smoother movement (there's significant tearing in the original).
Because the game is not very complex there is plenty of spare space (around 10K without taking any extreme measures) so I haven’t needed to do any clever space optimisation and it allows me to unroll loops without any problem. Some of the code is quite simplistic (sound generation being an example) as a result because I don’t need to do any self modifying or similar.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
The one thing I did notice was on the Mode 7 instructions screen the double height Beeb Chase above your name is off centre by 1 character and needs moving right