Curious about the data structure

All and any discussion and development of the Mudlet Mapper.
Post Reply
User avatar
Omit
Posts: 190
Joined: Sun Aug 01, 2010 10:54 pm
Location: Middle Earth
Contact:

Curious about the data structure

Post by Omit »

I was looking at the code for the mapper and how the exits were stored.
It appears that all the exits for a room are hard coded into the room table.
I was wondering how additional exits will be added to this. I would have thought that a second table (using the roomID as a foreign key) would be much more efficient. This would allow for as many or as few exits there were without the need for placeholders.(the static 1-12 exits in the room table and should save smaller, load and save quicker... not that it's slow now.) It may require a 3rd table to house the directions (those same 1-12 standard dirs their opposites if any plus any user defined ones).

Unfortunately, my skills do not allow me to do much more than look at the code and there may be reasons to do it the way you have that is not immediately apparent to me. I was curious more than anything. :D

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Curious about the data structure

Post by Heiko »

The "other" exits will simply be included in a mapping, because they cannot be displayed and are only relevant for the pathfinding.

Post Reply