Re: Wilderness

From: Sammy (samedi@ticnet.com)
Date: 01/01/00


From: Warren Robbins <robbinsw@UCS.ORST.EDU>
Sent: Saturday, January 01, 2000 4:43 PM

> I suppose my question is:  How else do people recommend trimming memory
> usage for an overworld (approx. 300x200 rooms)?  The area is composed
> (ATM) of stock room_data structure types.

My implementation was pretty memory-stingy.  It was an ascii overhead system
so I didn't need a whole lot of information, but by adding a few kludges to
the stock room system I still had access to room flags and such, although in a
limited fashion.  My solution was to use descriptionless stock rooms as my
terrain models.  In other words, there was a plains room, a forest room, etc.
These terrain rooms were all in a dedicated zone.

I used a 200x200 short int array for the map, where each element was the vnum
of the room that represented the terrain type.  I added mapX and mapY
variables to the character and object structures.  If they're in zone X (the
terrain zone), they were logically located in the terrain room.  The CAN_SEE
macros were modified so you'd only see people in that room if they also shared
your coordinates.

This required changes to movement and communications code.  I think it took me
about 3 days to get the basics set up (very quick for me at the time) and it
had very little effect on memory.  I think I may even have a copy of the
pre-bugfixed code if you want examples.

Sam


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT