User Tools

Site Tools


Collision Map

Collision is based on three 40 byte tables that are generated from Embedded bytes in the Inlay(SSC).

Embedded Bytes are a range of byte values that are not normally used in HIRES but may be used to indicate extra content such as collision markers.

Byte codes 32 to 63 hold the collision type, and these bytes are inversed(+128) if the same position is used as a ceiling or floor height mark.

Once extracted the collision value is reduced to 0 to 31 and stored in the Collision table (the third table).

Since the screen is copied top down both ceiling and floor markers can be the same code ($A0) and the relative Y position is stored in the Ceiling or Floor Table using the current X position as the index.

For each frame of the hero on the ground, the minimum y position is sampled from the floor table (Based on the width of the hero) and becomes the new Y position of the hero.

When the hero is airbourne (Such as when he jumps) the ceiling table limits the height he can jump. This prevents any corruption of background graphics that use both odd and even lines.

As the hero moves accross the screen, each new x position can be used to index the collision table and identify ground collisions. The first 5 values (32-36 or 0-4 as held in Collision table) have default definitions but codes beyond 36 are used for screen specific collisions.

Default Collisions

Embedded CodeCollision CodeCeiling/Floor MarkerDefinition
200NoNo Collision
211NoLeft Exit
222NoRight Exit
244NoInstant Death
25-3F5-31NoScreen Specific collision
A00YesNo Collision
A11YesLeft Exit
A22YesRight Exit
A44YesInstant Death
A5-BF5-31YesScreen Specific collision
oric/wurlde/collision_map.txt · Last modified: 2008/06/28 15:32 by twilighte