Step 2: Mapping the Screen

The first step to recreate the game is to map out the screen. Where a modern LCD screen has thousands of individual pixels, these old LCD games use the same concept but instead of pixels, complete images were drawn with the liquid crystal. The advantage is that you can use far fewer bits to render the screen, the disadvantage of course is that we're restricted with what we can do with the screen once it's created.

Where on a pixel based display you would consider the X and Y position of individual pixels, here we're numbering the images based on the logic of the program. Images that follow an animation pattern should generally be numbered next to each other. This way we can increment a counter more often than we make explicit jumps from one state to another.

The smoke animation is 4 frames that follow a particular pattern that can be observed by watching the game play. So those images are numbered 30 through 33. We can then loop a counter to go through the animation.

The person escaping from the fire mostly follows a single pattern. However, they can start at position 0 or position 2. If they start at position 2, they skip position 1. If they start at position 0, they skip position 2. Once into position 3, the pattern is identical and we can simply increment the frame counter for the instance of the character.

The player can be in one of 3 positions so we number those 22, 23 and 24. This way we can simply add or subtract 1 to move the player left and right.

Note that the only information we need about anything in this game is the frame. That means that for individual objects (player, character, fire, etc), they can be defined as integers in the code. We have no need for classes. Although you will see we will use a class to hold the program for the game itself.

Copyright 2018 RetroLCD