4

I have been playing a MUD game now off and on for over a year. I have scoured the internet looking for the best computer language to learn to develop my own. So far, I have come up with nothing but C. Is C the best language to learn for this application, or is there something better?

I know SMAUG was written in C, but that was years ago. I am new to programming in general and have some experience with Python. I have been playing Aardwolf, which allows it users (after a certain level) to create their own area's. The user does this using Lua. This was interesting to me, because Lua is a "scripting" language. So this begs another question - Do you build the game's format in C (or something else) but create the world with a script?

Also, this would be a game with only my friends, so a direct connection would be required since I would not be hosting it online. So, once again, I would like to dive into this world and use this as a pet project to also help me learn a programming language... but which one would be the best that would also allow me to scale it uo in the funture

P.S. - Any open source code out there that I can look at and study?

tnbrewer83
  • 43
  • 1
  • 3
  • 1
    If you want open source and Python you could look at [Evennia](http://evennia.com/). Disclaimer: I don't know much about it myself. – eldarerathis Apr 26 '11 at 16:27

3 Answers3

6

So, once again, I would like to dive into this world and use this as a pet project to also help me learn a programming language... but which one would be the best that would also allow me to scale it uo in the future

Most MUD codebases tend to be in C, but this is mainly for historical reasons. MUDs were fairly popular a while back, and at the time, C was by far the best language for portability which was supported by most hosting options out there.

That being said, a MUD is really fairly simple, in many ways. You could easily write a MUD in any language, provided it supports sockets and text parsing. Using a language with a good string parsing and high level socket support would actually be far simpler than some of the classic MUD code bases.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
  • So, that being said, would you opt more towards something like C++, C#, VB.NET (or some other OO language)? My understanding of C is really limited, but could be improved upon. However, I am fairly decent with Python. I just have never used it for any GUI programming. – tnbrewer83 Apr 26 '11 at 17:04
  • 1
    @tnbrewer83: I wrote a MUD, back in the day, in raw C. It was a great learning experience. If I was going to write one today, I'd probably do it in C# (but that's mainly because I really like using C#). You can really use any language you like - a MUD, at its core, is fairly basic, and supported by nearly every language. – Reed Copsey Apr 26 '11 at 17:10
3

There are a ton of available MUD engines available online : a quick look at MudConnector will give you a ton info of available servers, software and code bases.

As for your programming language of choice, if you intend on only making it available to you and your friends, Python would be fine - I made one entirely in Lua a few years ago and it was a breeze. It's a great learning experience !

SolarBear
  • 4,534
  • 4
  • 37
  • 53
  • 1
    Interesting. I did not think a "scripting" language would support an entire MUD application. – tnbrewer83 Apr 26 '11 at 16:51
  • Keep in mind that this was a small-scale MUD (never had more than 4-5 friends connected). How well it would've scaled in the long run, we'll never know! :) But it was far easier than my previous attempt in C. – SolarBear Apr 26 '11 at 16:57
  • Heh, I made a patch to use Lua as a scripting language in CircleMUD back in the day, but I would never have thought about using it to create a whole MUD server! :) – Some programmer dude Nov 15 '11 at 12:52
  • 1
    The demands of the average MUD are low, and so really are the number of players on even the biggest. Realistically, naïvely-implemented algorithms and poor architecture are more likely to be the cause of any performance issues than your choice of language. – Kristian Glass Mar 20 '12 at 11:04
0

perhaps you should look for a MUDOS

http://www.mudos.org/

xis
  • 24,330
  • 9
  • 43
  • 59