View Single Post
Old 09-03-2002, 09:21 PM   #1
Warhead
 
Posts: n/a
Hey everybody, I'm looking for some input on the benefits and drawbacks of using dynamic data structures for certain types of information.  I'm debating whether or not I want to code out some of my tables by making them dynamic and reading in from files.  I don't imagine it would be too terribly difficult to do, but I haven't decided whether or not it's worth my time.  Here is a list of advantages and disadvantages that I came up with regarding dynamic data structures.

Advantages:
1)  Much easier to create, delete or modify entries, and it can be done on the fly (no MUD restart involved).
2)  Shell access is no longer required to make changes to the data.
3)  Linked lists are much easier to keep track of when using recursive code.

Disadvantages:
1)  It's extremely easy to corrupt the data files.  I've had to back up many an area file because I screwed them up somehow.
2)  In most cases, it's easier (codewise) to manipulate and utilize tables, and a LOT of code rewriting will be involved in this conversion.
3)  Inexperienced or malicious implementors may be able to destroy/corrupt data.

I had at least 1 additional disadvantage, but it can't be that important, since I can't remember it right now.  However, I don't consider advantage #3 to be strong, because I rarely use recursive code, and at this point, can't think of any reason to use it to manipulate the tables which I want to convert to linked lists.  I also don't consider disadvantage #3 to be strong right now, because I'm the only one working on my MUD.  It's sort of my little personal project for now.  In the future, disadvantage #3 may become more of a concern though.

Oh, and since this is probably relevant, I own a modified RoT 1.4, and the tables that I want to convert are the commands table, race table, class table, skill table, spell table and groups table.

Any input or suggestions would be greatly appreciated.  Thanks in advance.
  Reply With Quote