Spidy has asked for the wisdom of the Perl Monks concerning the following question:

Are these possible? If they are, does anyone know how/have any good tips on techniques to learn or things I should make sure of while writing one?

Replies are listed 'Best First'.
Re: MUD's with Perl?
by simonm (Vicar) on Sep 10, 2004 at 01:14 UTC
    Are these possible?

    Of course!

    One possible source of inspiration is PerlMoo/Mooix. (Relevant docs are here and here.)

Re: MUD's with Perl?
by eric256 (Parson) on Sep 10, 2004 at 01:35 UTC

    MUD's are definitly possible in perl. I would recommmend reading some of the documentation on for programming existing MUD's. I have been working on a MUD bot for MSN programmend in perl. It has been a lot of fun and you will surely learn alot while doing it. I decided on an OO system which makes programming and providing scripting easy. If you would like some hints then just contact me more.


    ___________
    Eric Hodges
Re: MUD's with Perl?
by Zed_Lopez (Chaplain) on Sep 10, 2004 at 08:12 UTC

    Tom Boutell wrote PerlMUD (source is freely downloadable, but it's shareware on an honor-code basis.)

Re: MUD's with Perl?
by castaway (Parson) on Sep 10, 2004 at 09:55 UTC
    Possible, yes. (I'm running one, tho its more of a talker than a mud..) I'd link to an article about why not to write one, but it's in german.. ,) - Basically, there are too many half-started ones out there, and lots of good ones looking for programmers.

    Did you want tips on writing MUDs in general, or on doing socket stuff in Perl? If its the socket stuff, I suggest you start by attempting to write a client first :)

    C.

Re: MUD's with Perl?
by Spidy (Chaplain) on Sep 10, 2004 at 13:54 UTC
    Mostly tips on the socket stuff. I'm pretty sure I can figure out most of the rest on my own. For example, do I need a program running on my server for the sockets, and how would I do this stuff?

      Mostly tips on the socket stuff. I'm pretty sure I can figure out most of the rest on my own. For example, do I need a program running on my server for the sockets, and how would I do this stuff?

      Most MUDs set up a daemon which listens for connections. That's only half of the issue, though: you need to figure out how to listen for connections and process the game world with sufficiently low latency that your users don't crucify you upside-down by your :-) for creating something terribly slow. There's a few methods that you can employ to achieve this: forking, threads, and various non-forking models. Reading (and especially playing with the code in) perlipc is highly recommended required. If you can afford a book on the subject, I highly recommend Lincoln Stein's Network Programming with Perl. While not published by the Perl standby, O'Reilly, it's still worth the money.