Thread: auto maps
View Single Post
Old 05-17-2002, 11:13 AM   #3
cronel
New Member
 
Join Date: Apr 2002
Posts: 17
cronel is on a distinguished road
Angry

What you need to do to avoid loops is to remember the rooms you've visited so far. But yes, "non-cartesian" arrangements of rooms will always screw you as they are unmappable.

A basic approach would be to not only remember that you've visited a room, but remember where in the "grid" you found it. So if you find it again in a different position or find a different room for the same position, you have a problem. And when you are about to visit one such room, you add some mark to your ascii map, or such, and move on.

What I wonder is, what would happen if you stop assuming all exits are the same length. For instance an exit east, could mean the next room is not just one unit to the right, but two, three... Making a mapper that does this, however, seems a daunting task. I'm thinking it might be able to digest some non-cartesian areas but might produce maps you'd never expect.

By the way, some clients have automap, like Zmud and Kmud. Kmud is open source... may be worth a look. Also look at the SMAUG "track" code for a related problem.
--cronel
cronel is offline   Reply With Quote