[MUD-Dev] Creating a MUD - Overview of design

Neil Edwards neil at anyisle.org
Fri Jan 25 18:27:31 CET 2002


Hi there, I have been writing a very simple MUD in java for ages
now, getting so far then scrapping it all and re-writing it for sake
of better ideas.

I have recently been looking at a lot of articles related to object
persistance, networking with tcp and udp and also polling rather
than thread per client systems (which is, i'm ashamed to say, what
mine is).

I have a few questions then based on what I have read that I thought
I should ask which might aid me in creating a semi-advanced(?!) 
kernel for my MUD as apposed to the basic one I have already.

Firstly, object persistance. By this I mean that objects in the game
(inc.  rooms etc) are always stored in some form or another for
backup and actual use. In my MUD I just read everything from text
files (XML formatted) and then keep everything in memory until it
periodically saves everything again in case of a crash (Not yet
implemented online creation but should be easy enough). I was hoping
to move this system to a database system (been looking at MySQL
(free) ) but I don't think I fully understand what goes into the
database or how it is referenced. For example, if I have a table
which holds all the items (swords etc.) that can be created in the
game then do I also have another table that holds all of the actual
items in use by the game and how do I reference these (by ID
wouldn't work because two items of the same ID can be different
(quality of sword, same sword less durable) so don't really know
what to do there. At the momement I just have several Vectors in a
room object that hold items, players, actors (NPCs) and other
things. How would I change this to a database model? Should I even
bother?

Secondly, networking. I have read that tcp is overly slow and that I
should use udp (at least, I think that's what I read!) but surely
with so little information being sent (it is only text based after
all) then does that really matter? Also at the moment I have some
simple ServerSocket which accepts requests from clients and sends
each client off on it's own thread which waits on it. I have read
that it is better to just have a few threads polling each client to
see if they have written anything. Could anyone give me some MUD
specific examples because I don't really see how the to put the
one's on Sun's website into practice.

Sorry it's a long post and mostly garbage, any comments appreciated.

Thank you

------
Neil Edwards
http://anyisle.org

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list