If you're making your world room-based, you could have some problems: Main one is that rooms don't always point to where they logically should.
You could have five rooms, for example, that go:
Room A has an exit west leading to room B.
Room A has an exit north leading to room C.
Room B has an exit north leading to room D.
Room C has an exit west leading to room E.
So which room would you show as being northwest of you: room D or room E?
If your whole world is built in a way where this situation is not possible, then you'd have to set up an array (or list) of "view directions" similar to the exits (movement directions). Room A has a view west to room B, for example. Then, when someone looks inside room A, they see that room, and if that room has a view direction to room C, they'll also see that one... up to a certain range (Not a problem do to with a recursive function).
I don't think it'll work in a normal room-based world, and I agree with KaVir that you should consider an X/Y grid for that.
|