The contents of this page have been written by me around 2003. Since then, I have learned a lot, both technically and grammatically. As such I cannot guarantee that any of the techniques described in here are still accurate (odds are good that this can be done far easier nowadays).

Drop Off

This is the first of my 'Puzzles Inc' dreams. The idea behind these dreams is to bring something with an entertainment value to the people of furcadia, as well as to give an example of the possibilities of furcadia if you're willing to put some time into developing a dream.

This particular dream is based off a game I once found called Stroke. Tile-based and not time-specific (you can take as long as you want to make a move) made it a prime-candidate for use in furcadia. So I did.

Dream Design

Knowing that I'm not the best dream-designer in the world, I decided to develop a simple theme for this dream and stick to it, making only minor variations to it in the various portions of the dream. As you may have guessed the coloured edges and grey walkways that run between the islands are that theme.

I've tried to make the various sections distinguishable by colour and attributes, adding items here and there to try to give the fur some reference points as to where he/she is. I don't think I succeeded well at that as I myself get lost often enough, but still. It made a decent-looking dream atleast.

The Dragonspeak

This is ofcourse the most interesting part of the dream (or so I think). It consists of a lot of the same stuff, but you might find interesting bits in there as well. I won't be explaining everything down here, but I will give some mention on how the puzzles actually work.

Resetting puzzles

If you take a look at the dragonspeak you will notice that a few parts work a bit differently from what you might expect. The teleporters and such are pretty much the same as in any dream, but the way the puzzles reset might look strange at first.

Instead of making a reset for each and every puzzle I made a global 'reset' for all puzzles that stores the coordinates of the furre triggering it and sets a variable that turns on the 'reset check' for all puzzles. If there is only one resetting condition this would obviously end up with a more complex way of doing the same thing, but when there are more conditions (saying 'reset', walking into water, leaving the dream) then this particular method will save a lot of copying of the same blocks of code.

So let's take a look at what happens when someone walks into the water...

(0:2) When somebody moves into floor type 116,
(5:350) set variable %furpos to the X,Y position the triggering furre (moved from/is standing at).
(5:380) set variable %furtile to the floor type at (%furpos.x, %furpos.y).
(5:300) set variable %checkreset to the value 1.

...or when he leaves the dream...

(0:10) When a furre leaves the dream,
(5:350) set variable %furpos to the X,Y position the triggering furre (moved from/is standing at).
(5:380) set variable %furtile to the floor type at (%furpos.x, %furpos.y).
(5:300) set variable %checkreset to the value 1.

As you can see the actions are always the same for each resetting condition and only the causes change. Unfortunately this bit of copying is still required (or atleast: I don't see a way around it).

Now let's take a look at what happens on the puzzle-level of the dragonspeak. In this particular example we'll just take a look at puzzle YELLOW 1 (which is the first tutorial puzzle).

(0:100) When 1 seconds have passed, offset by 0,
(1:200) and variable %checkreset is equal to 1.
(1:201) and variable %furpos.x is greater than 59.
(1:202) and variable %furpos.x is less than 69.
(1:201) and variable %furpos.y is greater than 32.
(1:202) and variable %furpos.y is less than 38.
(1:201) and variable %furtile is greater than 499.
(5:41) place object type 155 at (58,30).

(0:10) When a furre leaves the dream,
(1:200) and variable %checkreset is equal to 1.
(1:201) and variable %furpos.x is greater than 59.
(1:202) and variable %furpos.x is less than 69.
(1:201) and variable %furpos.y is greater than 32.
(1:202) and variable %furpos.y is less than 38.
(1:201) and variable %furtile is greater than 499.
(5:41) place object type 155 at (58,30).

Each second it checks whether it should reset or not. The first line will check whether there is anything to check. If so we then check whether the furre that triggered the reset is within the rectangle (59,32)-(32,38) and that he moved from a tile with a number above 499. This last bit is to make sure that he moved into the water from a puzzle instead of from the walkway as the puzzles are the only parts that use custom floortiles. If all conditions hold, we place object 155 at the entry position of the puzzle to indicate that it should reset. (As you can see I wasn't entirely true to my word and copied the reset-check to have one version that triggers when a furre leaves. This has a very specific reason that I will discuss a bit further down.)

Now all we need to do is check the entry-position for object 155 and reset if it's present. We will change all the sinking/sunk tiles back to normal floortiles and change all the gem-placeholders (empty objects that are placed at spots where gems are picked up) back to gems. We'll also kick any furs on the puzzle out onto the walkway and replace the entry points for the puzzle. Or in other words:

(0:100) When 1 seconds have passed, offset by 0,
(1:1013) and position (58,30) is object type 155,
(3:3) within the diamond (64,31) - (64,39),
(5:2) change floor type 501 to type 500.
(5:2) change floor type 502 to type 500.
(5:2) change floor type 503 to type 500.
(5:5) change object type 2405 to type 2404.
(5:17) move any furre present to (58,29), or to someplace nearby if it's occupied.
(5:41) place object type 156 at (58,30).
(5:41) place object type 156 at (60,35).

Entering/Finishing puzzles

Obviously we want people to be able to enter the puzzles as well. Thankfully these are just a few basic commands. All we do is check whether he walks into the entry-position and, if so, move the furre to the starting position on the puzzle and remove the two circles so no other furres can enter until the puzzle is done. The code for this is as follows:

(0:7) When somebody moves into position (58,30),
(1:3) and they move into object type 156,
(5:14) move the triggering furre to (60,35) if there's nobody already there.
(5:41) place object type 0 at (58,30).
(5:41) place object type 0 at (60,35).

Finishing a puzzle is slightly more complex. When somebody moves into the gold tile we will have to check whether the furre has picked up all the gems. In this case I use (1:1014) to check whether the gem is no longer there. After that we have to reset the puzzle. Fortunately we already have the dragonspeak for that and all we have to do is place object 155 at the entry-point to invoke it. Last but not least we play a sound to tell the furre he/she has succesfully completed the puzzle.

(0:7) When somebody moves into position (68,35),
(1:1014) and position (62,36) is not object type 2404,
(1:1014) and position (64,35) is not object type 2404,
(1:1014) and position (64,34) is not object type 2404,
(5:41) place object type 155 at (58,30).
(5:11) play sound 76 to every furre who can see the triggering furre.

And that's all there is to most puzzles.

Drawbacks

This way of doing things isn't perfect, but I found the problems it produced not particularly troublesome. Since the resets are checked only once a second it might happen that a resetting condition gets ignored if two of them happen within the same second, because in that case the second event will overwrite the first. The odds of this happening are low though and never a threat to the integrity of the dream, except for one case and that's when the event ignored is the leaving of a furre.

When a furre leaves and the puzzle isn't reset, the puzzle will cease to be accessible. Malicious furres could use this bug to disable all the puzzles. Obviously we don't want this and that's why I added the second reset block earlier, the one triggered by the leaving of a furre. This copy of the reset block will make sure that the puzzles will always get reset when a furre leaves, no matter what else happens within a second of that event.

Play the game yourself

Even if you're not the least bit interested in the rant above (I wouldn't blame you), you will probably want to give the puzzles a try. Just download the dream below, relink the patch and upload it.

Drop Off (40.1 kB)

Enjoy and ware the edge!