Page 1 of 1

Curious about the data structure

Posted: Thu Nov 18, 2010 3:17 am
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

Re: Curious about the data structure

Posted: Thu Nov 18, 2010 7:02 am
by Heiko
The "other" exits will simply be included in a mapping, because they cannot be displayed and are only relevant for the pathfinding.