Re: [RELEASE] Wilderness/ASCII Mapping System

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 06/19/98


I agree about the 1 room per map-space being a waste.  I some questions if you
don't mind:
1) How do you keep track of who is where?  Coords on the player and obj?  And
for going in the oppsite direction room -> thingy? how is that done?

2) I am guessing that this one byte per room is the char that is printed,
correct?

3) any way we could see the relevant sections from char_to_room and
char_from_room?

4) I am guessing a lot of stuff moved into low level functions, just to make
this easier :)

--Angus

______________________________ Reply Separator _________________________________
Subject: Re:  [RELEASE] Wilderness/ASCII Mapping System
Author:  INTERNET:CIRCLE@POST.QUEENSU.CA at CSERVE
Date:    6/19/98 2:14 AM


Several months back I too wanted to do an overhead map... but I took a
different approach.  Using a full room structure per room is a waste
of memory for the size of map I had in mind.

Instead, I stored the rooms in a large array in memory. My current map
-- approximately 900 by 800 squares -- has about 720,000 rooms in it,
and takes one byte per room in memory.  To handle characters on the
map, I have a special room set up where every player and object on the
map are closeted away.  This required a lot of changes to low-level
functions, but after a bit of work it works very well.  The map is so
large that it is possible to easily get lost between cities... which is
the desired effect.  Right now it's running around 1500 lines of code.
There are doubtlessly still some bugs left, but I'm very happy with it
-- as are my users.

There are a lot of different approaches.  It depends on your desired
size, efficiency, memory, etc.  I like mine because it is easy to
change the map (it's basically a big text file, but there are other
ways we edit it) and pretty efficient on load-up (considering it has
to quickly parse a 700k file, anyway).

I bug my builders saying I made 700,000 rooms, why can't they do that
too? ;)

--
James Turner               turnerjh@xtn.net
                           http://www.vuse.vanderbilt.edu/~turnerjh/


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST