Oh yeah, I'd forgotten I wrote a MUD server in C++ <grin>.
Forum post:
http://www.gammon.com.au/forum/bbshowpost.php?id=4496
Download:
http://www.gammon.com.au/files/muds/tinymudserver_v2_3.tgz
It is pretty basic, but if you are starting off with C++ and MUD servers, this might be a good place to see the fundamentals.
Quote:
Actually, interestingly enough I think, the main problem is one of game design, not really code.
...
The thing is that these days, if you were to write a whole codebase from scratch, you probably wouldn't be doing it exclusively in C/C++ anyhow, so it's rarer and rarer to see people working in just C++.
As usual, I agree with David. ;)
Apart from doing something trivial, for fun, I would be putting a lot of work into design before I lifted hand to keyboard. Indeed, questions like "should I use C++?", whilst important, should be done after questions like "will I have instanced dungeons?" or "will I have ranged weapons?".
It is questions like those that will influence fundamental design concepts, and thus, the code that is written to meet those criteria.
I am leaning towards SQLite now, as a platform for storing MUD data. For one thing, you could have a very large MUD, but not have to load it all into memory on startup, as a lot of MUDs do. For another, you could change things on the fly, writing new room descriptions to the database, for example, while the MUD is live.
For the main engine I would use C++ (if I used a high level language at all). I experimented with doing an entire MUD in Lua, but I think that might have some possible problems.
For a script engine I would use Lua - that is fast and easy to integrate. Scripts could be used for things like mob AI handling.
Then you have the potential question: "do I want a custom client?". That one is sloshing around in my brain these days, and one day fairly soon I will be hopefully writing a lengthy post about that. |