|
|||
|
The Combination Lock |
The Combination Lock The fundamental trick behind the combination lock is that it is possible to make a platform move in arbitrary increments (rather than going all the way to one of its limits), by controlling it with another platform that has the Deactivates At Each Level, Activate Adjacent On Activating, and Deactivate Adjacent On Deactivating flags set. Both platforms will move for exactly the same period of time, set by the control platform's speed and min/max height. If the time required for a complete cycle of the controlled platform's movement is an exact multiple of the control platform's time, it will reliably step through a set of evenly spaced positions (the number of positions being equal to the multiple of the control platform's time). |
|
If you've managed to follow the description so far, you can see how a combination lock with any number of digits can be built. The next step is to somehow determine when these digits are set to the proper value, so that some action can be triggered (unlocking a safe, perhaps). Unfortunately, Marathon offers no direct way of detecting when a platform is in a certain position. Time for another trick... try not to laugh too hard when you see how I solved this problem. My solution is to have one creature firing at another, one of which is on a platform. (This is the purpose for the target platform mentioned earlier: the indicator platform itself doesn't move far enough for this to work.) A switch is positioned such that it will be struck by the creature's fire only when the platform is in a specific position. I have arbitrarily chosen the Enforcer Minor as the firing
creature (since their normal weapon is capable of triggering
switches), and the Tick Kamikaze as its target (since they don't
seem otherwise very useful for anything). However, some physics
model tweaking is necessary to make this technique work reliably,
and could just as easily be applied to any two creatures that
aren't otherwise needed on the level. The Tick is made completely immobile (movement speed 0, can't float or fly) so that it doesn't wander off. It is set to have no dying or dead shape, to avoid cluttering up the level with corpses (an alternative would be to have the shot being fired do 0 damage). In Forge, Ticks are set to have an infinite number available, with 100% appearance. The min count is set equal to the initial number of Ticks present. In short, Ticks are turned into immortal, immobile lumps. The Enforcer is set to fire individual shots instead of bursts,
with 0 error (otherwise, the switch would occasionally be hit
even if the indicator was off by one). The firing rate, and the
movement speed of the shot itself, are increased in order to
minimize the response time. The player is removed from the Enforcer's
list of enemies, so that their actions can be observed without
drawing fire. The Minor/Major flags are cleared for both types
of Enforcers, so that neither gets transformed into the other
based on the difficulty level. Both creatures have the Can't
Skip flag set, so there's no chance of any of them being omitted
on easier levels. The
indicator platforms are extremely long: one end of each is visible
in the cabin where the combination lock is located, and the other
end reaches through 5D space to touch the target platform in
the associated shooting gallery. The control platforms are adjacent
to the indicator platforms, immediately behind the visible part
of the lock (but of course they could be located anywhere along
the length of the indicator platforms). Another gotcha: the raised area containing the Enforcer must have at least three polygons. A creature with less potential mobility than that seems to be incapable of attacking normally. To see an Enforcer/Tick shooting gallery in operation, just take a few more steps down the corridor you're in. (Editors Note: Please refer to Figure 2 or level 3 in "Missed Island" - gls) This will teleport in a pair of creatures to the demo room you just left. You can go back and play with the demo some more, this time with it fully functional. When the proper digit is selected (2), the Enforcer's shots will hit the switch. For the purposes of the demo, the switch simply toggles the lights in the room. The Enforcer does not consider you to be an enemy, so it will not intentionally shoot at you unless you bother it. |
I have described how a multi-digit combination lock can be
built, and how to detect when each individual digit is set properly.
All that remains is to somehow detect when ALL digits are set
properly, and trigger some action based on this (such as opening
a safe). In terms of digital logic, this function is called an
"AND gate": to implement the 3-digit lock on Missed
Island, a 3-input AND gate is needed.
In
summary, this simple approach isn't really usable. It was described
because it forms the basis of one of the more practical forms
of AND gates, described next. The doors are initially extended, and deactivate at their
initial level. They must have the Can't Deactivate Externally
flag set, so they can't remain in an open position if their controlling
digit is changed to an incorrect setting. The delay or speed
of each door should be slightly different: otherwise, a situation
might arise where two doors are opening exactly out of sync with
each other, never giving the Enforcer a clear line of fire. COMBINATION LOCK - SUMMARY An N-digit combination lock requires:
For reference, here are Marathon Infinity's limits on these resources:
1. The inputs are on/off switches, not continuously triggered switches as in the combination lock. 2. With eight doors between the Enforcer and its target, you might have to wait quite a while before they all happened to be open simultaneously. 3. Missed Island didn't have enough platforms left for me
to be able to afford using eight of them on this puzzle. Instead of platforms, the switches in this puzzle control lights, which in turn control liquid levels. Since the Enforcer's shots are not set to penetrate liquids (like SMG flechettes are), a raised liquid is just as effective as a raised platform for blocking the shots. The floor of the liquid-filled area is set very low (below the Enforcer's min ledge jump setting) to keep the Enforcer from simply walking over to the Tick, which would ruin the puzzle. Note that the situation pictured here is not one that the
Marathon engine can display properly. A boundary between different
liquid levels produces smearing: basically, liquids define a
volume with a top but no sides. This isn't actually a problem
in the game, since the player can never see into the AND gate
mechanism. Just make sure that Enforcers have the Don't Complain
About Ugly Texture Smearing flag set. (that was a joke, not
a feature request) In retrospect, this wasn't the ideal solution, since it makes it rather difficult to change the solution of the puzzle. Two better ways to reverse the meaning of some of the switches: 1. Define the light that the switch controls in a backwards manner: 0% when active, 100% when inactive. 2. Define the liquid that the light controls in a backwards manner: low tide higher than the high tide. Yes, Marathon handles this situation just fine. Note that switches which should be in the active state to
solve the puzzle (assuming the normal assignment of switch images
to the active/inactive textures) MUST use one of the two techniques
above, since the liquid level must be lowered to trigger
the AND gate. A switch which should be in the inactive state
must use neither of the two techniques, or both. ON/OFF SWITCH PUZZLES - SUMMARY A puzzle of this sort, with N switches each having to be set to a certain state, requires the following resources:
|
Download Jason Harper's prize winning map, "Missed Island". This is not only a playable puzzle map, it is also an example map and tutorial. This tutorial was taken from that map. The tutorial on this page can be reached by "warping" to level 3. You must use the provided shapes file to make any sense of this map. |