All is not as simple
as this though. Alien 8 has more than 32 game objects and so cannot
fit into the 5 bits allowed.
In Alien 8, whenever the block type is shown to be 0x1Fh, skip
this byte and the following then move on to the next, this next
byte is the block type/count block. The reason is quite simple,
when you come across this special block (called a control block)
add 0x20h to every subsequent block type. For example, if the block
byte was 7 this signifies 8 block type 0's. With the control block
active it becomes 8 block type 20h. Control blocks are always last
in the data so do not have a 'revert' mode. Each new room starts
with the Control Block off and there are no location offsets (detailed
below).
One other thing you may have been wondering is if we have 2 bits
for Z location how are items placed above this when a room can have
8 objects in height?
Another simple yet concise solution and similar to the control
block. In Alien 8 whenever a block type 0 is found it means that
the z location for the remainder of the objects are offset. The
next byte is read, bits 0 and 1 are the x/y offsets and the remainder
are the z offsets. A 1 in the x/y signifies a half block shift and
the z is in pixels offset from the ground (multiplied by 4). Note,
z offsets are really only of use for Knight Lore. Remember in filmation
games the size of blocks are measured as x and y are 8 pixels for
one block and z is 12 pixels for one block.
I guess to keep things simple because this control block uses two
blocks (one for the control block and one for the offset) this is
the reason why the control block for block extensions (1F) skips
two bytes.
In Knight Lore this method is not used, instead the offset is stored
in the block data lookup table (6C0B) - refer to above for what
the offsets mean. What this effectively means is that Knight Lore
required two blocks for every block that could be in the upper half
of the screen, whereas Alien 8 required just one, but the drawback
is that an extra byte per block placed is required.
In other words in Knight Lore to have one block high and low requires
two block types (even though they are the same) with the offset
in its block details; whereas in Alien 8 you just need one but embed
the offset in the data. There are pros and cons with both methods.
also, it is implicit that all Control Blocks do not have an offset.
Again, there is no need to extract all the information from the
block data, instead refer to the map file (see to the side). The
same reason applies - more information is required to make the data
useful. |
Alien 8 has an extra 7 blocks.
If you read the filmation viewer map files you
will see the room objects in the section enclosed by 'START OF BLOCK
DATA UNTIL END' |