-
Notifications
You must be signed in to change notification settings - Fork 11
Mask
Every room is seperated into a 3x3 grid. We use an octal numeral system (http://en.wikipedia.org/wiki/Octal) to describe dimensions and capabilities of a component in a six-digit mask.
For example: in obstacle_hookshot_200700_1, 200700 is the mask.
The first three digits declares if the slot right in front of a door in a direction can be accessed i.e. has floor.
200
040 010
002
In obstacles the door mask also declares if a slot in front of a door can be reached without the equipment item for which the obstacle is intended. An obstacle for hookshot or flippers which has several directions might make a door non-accessible even if it is just used for one of it's possible direction. The doors which cannot be accessed should then be added to the mask.
An obstacle which does not make doors non-accessible, like lamp and bow, need not add any doors to the door mask. See examples below.
The last three digits declares the slots in the mask that the component occupies spatially.
400 200 100
040 020 010
004 002 001
Each row is added for the door mask to produce the first three digits and each row in the room mask is added to produce the last three digits: 000000 or 010110 or whatever.
A component which clams the "middle" slots is responsible for making progression through the area towards it's door mask's doors possible by a margin of at least 16px.
This is an empty room, before it is populated by components.
Here we have populated it with a filler with the mask 000004. It does not cover any doors, and it only covers the lover left corner.
Here we have populated it with a filler with the mask 000400. It does not cover any doors, and it only covers the top left corner. Notice how it doesn't matter if the component populates the room with solid walls, obstacles or floor.
Here we have populated it with a filler with the mask 002007. It covers the whole bottom row in the grid and the south door.
This treasure_bigkey_000111 occupies the left column but does not cover the east door.
This obstacle_hookshot_north_250777 covers the whole room and does not allow for doors to the east or to the west, giving it the door mask 050. Since the door in the obstacle's direction is normally unreachable, we also add the north door to he mask: 250.
This obstacle_hookshot_north_200777 also covers the whole room but allows for doors in all directions. Only the door made unreachable by the obstacle is added to the door mask.
This image shows obstacle_bow_west_200000 (along with filler_000001 and filler_000004). The obstacle_bow does not add the west door to the door mask since it is not normally unreachable if it is not used. If an open door was put there the player could reach it.
Here is how filler_000400, filler 000004 and treasure_bigkey_000111 looks together.
And here is how puzzle_000700 and filler_002007 looks together.