[MUD-Dev] [DGN] Writing... a mud...

erich-herz at uiowa.edu erich-herz at uiowa.edu
Wed Sep 3 12:13:46 CEST 2003


Hi all.

I just recently subscribed when I realized that it was silly to try
and write a mud with nothing to compare it to.  I have joined,
hopefully, as much to contribute, as I have to learn.  Let's face
it, I have a long way to go.

Issues I wish to discuss:

Threading

  My first method, as a young socket programmer, was to fork each
  client.  Then I read more and learned about select() and using a
  state machine for multiple-step procedures.  It's slightly ugly,
  but that's the way it goes.  THEN I learned about thread pools.
  My current plan resides somewhere in between - it involves 2-3
  threads - no real "pooling", in the formal way.  Anyway, thoughts
  on this?

Ticks

  The game that inspired me, and one of the only muds I've played
  for more than 6 hours is MajorMUD (www.majormud.com), which runs
  on Galacticomm Worldgroup BBS.  It is old, and therefore pretty
  limited.  Not only that, it costs roughly $2000 to start your own
  server!  I wanted to make a clone of the game that makes up for
  its shortcomings and is open-source.  I'm sure free muds are much
  more sophisticated by now, but play in a different style.  Anyway,
  MajorMUD uses a 5-second tick system - there is one large
  heartbeat, and every 5 seconds everything happpens.  This rules
  combat, as well - so it is possible to pounce right as a tick is
  about to pass, therefore striking your blow almost immediately
  without leaving the enemy time to flee.  I found this to be
  flawed, and boring.  In my game, combat is ruled by speed - rather
  than getting multiple swings per round, you swing faster as you
  become more skilled/stronger.  Thoughts on this?

Command parsing

  Any recommendations as to how I should set up my parser would be
  greatly appreciated, as right now it's completely formulated by my
  mind with some small influence from people on irc.freenode.net.
  it creates a tree with multiple paths based on the syntax of an
  expression.  then, it uses these paths to check for correct
  syntax, and creates a function signature based on the path, which
  is what the CommandMap uses to find the handler.  it's flawed, and
  doesn't quite work/look as good as I want it to.  at least is this
  a decent idea?  Thoughts.

Class hierarchies

  I've heard that there are other ways of dealing with items than
  just polymorphic inheritance relationships.  What are these?  I
  recently changed the game so that all objects in the game are
  derived from a base Thing class - hoping to save code and make my
  game more elegant.  Good idea?  Thoughts.

There are more problems, I'm sure.  I just don't remember right now.

Sorry about the really long email.
-Erich
_______________________________________________
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