|
As a preface before we go any further: you will not convince me not to use C#. You just won't. I've had a dozen arguments of C# versus Java, nobody will persuade me otherwise. ;)
I am working on a MUD framework in C# that is inspired by ROM 2.4b6 classic. The framework is designed to provide a MUD platform for new generations that is great for rapid design and prototype. The goal is to allow amatuer would-be MUD administrators and future programmers to learn today's technology, as well as allowing seasoned admin veterans to be able to play around with even more complex concepts in their MUDs that are less feasible in and much more time consuming in other languages, such as C.
That said, the framework, game logic, network handling, timing, buffering, and so on and so forth is almost all completely functional. My next target is to nail down how information about the game is stored and loaded. The two technologies I'm debating between at this point are probably no surprise - XML or SQL.
I've worked with game systems that have relied on one, the other, or both simultaneously - there are some significant trade-offs between the technologies.
On one hand, SQL is by far the fastest and most efficient technology. For a huge MUD or game server, SQL is definitely the way to go in managing massive amounts of stored data lightning fast. SQL also provides easy integration to just about everything - your web server, your blog, and other utility applications you write - almost all of these support SQL better than XML. In addition, SQL provides tools for remote administration, and also takes up less disk space overall (though that's hardly a concern these days).
But on the other hand, SQL has a number of significant drawbacks to the MUD community. First, it requires a "new" technology that isn't support by the majority of MUD hosting organizations. In addition, SQL has a barrier to entry - setup. With traditional MUD codebases, you can download and execute, get on your administrator character and begin toying right away. With SQL, you would have to install and configure SQL, learn about how SQL is maintained, and so forth. I see this as a significant deterrent to creating a MUD, using SQL as a newbie can be a challenging and frustrating experience.
XML isn't as fast by a significant margin, but provides a number of other bonuses. It's easy to work with because you're using tools you're already familiar with - your operating system. All the files are stored in the OS filesystem so maintaining and accessing those files isn't difficult at all. The plain text and human readable format is nice for MUDs as well, accessing player data and finding which AC value is which is no longer a guessing game, because it tells you what's what in plain English.
XML also provides one huge benefit - shell accessability. It's a lot more difficult to access your SQL information from a strange place or from your smartphone, whereas with XML, you can telnet into your shell and use your good friend pico (or whatever you love) and edit whatever you need to with ease.
Now, there is the opportunity to use both XML and SQL as a third option, although I'm most hesitant to do that since it requires the operator to know and understand both of those technologies. That option is to store certain information in SQL, with the rest of it in XML.
SQL: - Player files - Persistent map data (not area files, but items on the floor, dead mobs, etc.) - Most standard "runtime modified" content
XML: - Areas - Object definitions - Mobile definitions - Just about everything else, specifically things that are accessed very infrequently at runtime, except at predefined intervals (such as boot-up, reloads, copyovers, etc.)
It's really a tough decision to pick between the two, but after talking with a few other MUD developers and implementors, I'm leaning towards the XML solution. In an application such as a text MUD, heavy load isn't nearly as big a concern as in something with more "moving parts" - such as 3D game with vertices and precise coordinates that are constantly being recalculated by the server, leaving less cycles available for things like processing XML files.
What are your thoughts on the problem presented? Are there any additional recommendations or considerations you can think of?
~Polatrite~
|