| Message |
Oh, yes, knowing how to use MySQL and understanding SQL databases in general is an incredibly important skill as a programmer. As soon as you start working with relatively large quantities of data, the database (as it were) makes your life much easier.
You're probably right about the multiple levels of parsing. If I weren't using Lua by this point, I would go back and actually time the stuff to see where it's taking so long. But since I'm using Lua, it's pretty much irrelevant.
<rant>
As a general comment on SMAUG, a lot of it works this way. It started out quite simple, and a simple solution worked. In this case, storing everything as plain text with a somewhat hackish parser worked. So why change it? But then things started growing, and you start having many, many players with thousands and thousands of rooms. Suddenly the old format becomes brittle, and very rigid with respect to change. Maybe it wasn't such a clever idea to hard-code in sequences of numbers for mob stats, such that if the sequences aren't printed in exactly the right order things break. But by this point, fixing it means a lot of work, and, well, most people are somewhat lazy in that respect. (After all, it still "works", right?)
There are many examples of this in the SMAUG code. Part of that is due to the fact that it was built on Merc and Diku, so we have three whole levels of accretion built in. Mind you the SMAUG code base is still very nice work, but they made some design choices out of laziness that came and bit them in the neck fairly seriously. Sure, it's convenient to store pointers to next and previous in the object itself, and not a proper list node. But, then if you want an object to be in multiple lists, you have to store next/prev for each possible list the object could be in!
Anyhow, ... :-) </rant>. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|