The simplest way would be to assign the directions
northeast and northwest to them, and if the player
tries to simply go NORTH, print a message telling
him to use NE or NW instead.
You might also want to implement commands such
as GO THROUGH WHITE DOOR, etc.
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
Alternately, you could set things up so that the command north
prompted the player to choose which door he wanted to go through.
i.e." Which door do you want to go through, the black one or the white
one?" However, the idea of making the doors northwest and northeast
would be easier to implement. As a slight modification to this, you
could have one door be north and the other be northeast or northwest,
depending on which side of the room the player is standing in.
This thread reminds me of a similar problem that I am
experiencing. I am trying to find a good way to implement four rooms
connected as follows:
"Rooms" A, B, C, and D simulate an outdoor location. Rooms A,
B, and C are squares of equal size. A is west of B which is west of C.
Room D is the size and shape of A, B, and C put together and is north
of A, B, and C.
Obviously, from D you go southwest to get to A, south to go to
B, and southeast to go to C. The problem arises when deciding on the
direction from A to D or from C to D. If I say D is north of A, this
could confuse people because if they started at A and went North and
then South they wouldn't end up back at A. On the other hand, if I
say D is northeast of A, this could bother people trying to get from A
to D by going north, since they wouldn't be able to even though D
really is north of A. As a compromise, I could allow people to get
from A to D by going north or northwest. However, this would still
allow someone to start at A, go north then South, and end up at B.
As an alternative, I could redesign this portion of the game
to do away with the direction-assigning problem, but that would be
difficult since the scenario I described is really a simplification of
a larger area with many such intersections.
So . . . any suggestions?
Norman Perlmutter
It seems to me that you have two basic choices, given your criteria:
1) Make the directions from D be SW, S, SE and the ones in A, B, C be NE, N,
NW respectively.
This kind of ruins the illusion of D being as big as A, B and C combined.
2) Going from A, B or C to D will always be N but when you're moving from D,
the room description mentions three walls to the south. If they try to move
south from D, then it asks which door they want. You could also allow the
directions SW, S, SE to move them to the appropriate room as a shortcut.
This way, if you start in A and go N. S. you get asked which door you want
and don't automatically end up in a different room. But if you didn't want
to type the whole thing, you could just type N. SW. and end up back where
you started in room A.
Dave
This seems like it could be the right way to go about things,
but I'm not sure since if someone wanted to go from D to B they would
have to type two commands. But all my other ideas have drawbacks too.
hmmm.
Norman Perlmutter