View Single Post
Old 09-09-2007, 02:31 PM   #6
Alankor
New Member
 
Join Date: Sep 2007
Posts: 3
Alankor is on a distinguished road
Re: Rooms and links between rooms

Chaosprime, that's what I was thinking about. I was trying to code something like that for a different project, and thought maybe MUDs were doing something like this so I wanted to check out how they were doing it.

I find that keeping links between elements as full objects leads me to a lot of subclassing (I keep one base class for link, then subclass for special cases that require specific conditions, and there are quite a few), wich is not *that* bad by itself, but maybe it could be implemented in some other way that could save us all those classes. Any ideas?

PS: One nice thing it lets me do is keeping a "Theseus thread", so I can rollback all actions and go back through the same path, keeping all conditions (if I need to have a switch activated on room 2 in order to go from room 4 to 5, it asks for the same when going from room 5 to 4). But there are quite a few uses, maybe a labyrinth where links between rooms keep changing randomly on 10 minutes intervals or stuff like that.
Alankor is offline   Reply With Quote