Game Development Reference
In-Depth Information
We have a single transition marked by the number four to the north. Additionally, we have 11 squares on the left,
21 squares on the bottom, and 12 squares on the right. That would be 45 transition events, if we did them one by one.
So, let's not.
Let's Crunch Those Map Boundaries, Shall We?
The topmost square of the left boundary is (0,3), while the bottommost square of the left boundary is (0,13). The
left-most square of the bottom boundary is (1,14), while the right-most square of the bottom boundary is (21,14).
The topmost square of the right boundary is (22,2), while the bottommost square of the right boundary is (22,13).
What does this mean? Well, we can see some trends.
When you trace a horizontal boundary, you will find that the value of Y stays the same.
When you trace a vertical boundary, the value of X stays the same.
Thus, our conditional branches should read as follows:
@>Control Variables: [0002:X] = Player's Map X
@>Control Variables: [0003:Y] = Player's Map Y
@>Conditional Branch: Variable [0002:X] == 0
@>
: Branch End
@>Conditional Branch: Variable [0003:Y] == 14
@>
: Branch End
@>Conditional Branch: Variable [0002:X] == 22
@>
: Branch End
@>
Keeping in mind that == is the equal sign when used in this context (a single equal sign means that a value is
assigned in programming), you can probably tell what is going on. Note how every conditional branch event ends
with a Branch End . The first conditional branch covers the left border. The second branch covers the southern border,
and the third branch covers the right border.
But You Don't Have Anything Inside the Branches!
Keen eye! Indeed, you would be correct. Feel free to put in transfer events, as you see fit, to wherever you want them
to lead. The best use of such a transition in practice is to send the player to the world map (on which it doesn't
particularly matter where the player exits from, only that he or she exits the area map from a certain direction).
@>Control Variables: [0002:X] = Player's Map X
@>Control Variables: [0003:Y] = Player's Map Y
@>Conditional Branch: Variable [0002:X] == 0
@>Transfer Player: [001:MAP001] (013,006), Left
@>
: Branch End
@>Conditional Branch: Variable [0003:Y] == 14
@>Transfer Player: [001:MAP001] (008,011), Up
@>
: Branch End
 
Search WWH ::




Custom Search