View Single Post
Old 10-11-2003, 05:58 AM   #5
JilesDM
Member
 
Join Date: Nov 2002
Posts: 66
JilesDM is on a distinguished road
Yes, let's. That is almost always a very poor design decision.

This is easily accomplished when using a base room class.

As for counting, here's what you need to do:

1) Design a robust system of assigning unique IDs to rooms
2) Design a scheme for storing the necessary information.

That's it.

Necessary UID characteristics:

Addition of new rooms must not alter the UIDs of existing rooms.

The UIDs of deleted of rooms must be removed and invalidated. The former is trivial, the latter less so. Failure to ensure the latter may result in players with exploration "scores" of greater than 100%.

The details will vary based on the design of the specific mudlib in question. A relatively efficient generalized implementation of this sort of system is actually fairly hard to design, though the problem can be simplified greatly if you can guarantee certain extra restrictions (e.g., no room will ever be deleted once it has been seen by a player).
JilesDM is offline   Reply With Quote