• Advertisement
Sign in to follow this  

Looking for advice

This topic is 3327 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am looking to start creating a brand new codebase for a MUD. I am not quite sure the best way to start out and I am undecisive as to whether C or C++ would be the better choice. Which would be better suited for muds or does it matter? I know that a muds must be developed using a cross platform language, so are these languages ideal? Any input for this is greatly appreciated, thank you ;)

Share this post


Link to post
Share on other sites
Advertisement
C or C++ with a cross-platform compiler (gcc). This requires multiple executable (exe) distributions. Java or python which are cross-platform as they are loaded by existing processes (Java and Python accordingly). The same can be said for Perl, PHP, Ruby, etc. but they are usually web based (you can run a .php inside php.exe as a MUD if you wanted).

Oh, and no, there is no platform restrictions on MUDs. It's you choice. You could use C# so it's just for Windows (or Mono). Linux just happens to be popular for MUDs because well.. MUDs are simple and there's no reason to use heavy-duty VC++, .NET, DX, XNA, or windows-exclusive libraries instead of standard C++.

Share this post


Link to post
Share on other sites
i didnt think about a cross platform compiler either. Thank you for your input. I will consider GCC and now its just whether C or C++ plus should be the route to take or one of the other mentioned languages. I willnconsider Java and Python as well, but I need to research this thoroughly enough to figure out which best suits me. What are muds usually coded in these days?

Share this post


Link to post
Share on other sites
Seen a few people start coding MUDs in C#. I'd imagine there's plenty in VB (ew). You could use C, but I fear you'd develop bad habits when you transition to C++. I'm not a huge fan of .NET, but C# as a designed language ain't that bad.

C++ is always a good choice.

Python is a great beginner choice if you ignore the fact it isn't standalone executable (.py files) on Windows (until you figure out something like py2exe - then it's cake).

Once you choose a language, choose a networking (sockets) library (RakNet for C++, Twisted for Python, .NET for C#, .NET for VB, etc)

Share this post


Link to post
Share on other sites
I might have a look into C# and thank you for the input on the networking libraries. Is Raknet a very reliable library to use as a third party library? I have never used it before, but I could try it out to see what I think about it. It looks like once I have my language and libraries set up then I can begin work on my game engine itself only after I draw up the game design for the mud. I guess if I wish to make the codebase versatile and adaptive like many of the other codebases out there then I should make it easy to customize right? Like the ROM, MERC, SMAUG or other codebases? Any suggestions on mud designing for my codebase is appreciated. Thanks :)

Share this post


Link to post
Share on other sites
Quote:
Original post by knowledgecoder
I am looking to start creating a brand new codebase for a MUD. ... C or C++ would be the better choice
I would strongly suggest you use neither.

While both C and C++ will work for it, I would choose neither one if that is possible.

There are many other languages that are better suited for the multiplayer & networking aspects.

Python jumps to the front of my list. C# and Java are also better than C or C++ due to the improved support for networking and data handling. Even some of the more academic languages like Oz, Eiffel and Scheme are better suited for that kind of app, because they each have native support for the most common processing and relieve you from so much of the support code.

Go take look at the sources to some actual MUDs written in a variety of languages. You will learn a lot. The ones in that list are all under 16K so they should be quick to understand, and are written in seven different languages. Note that the winner of the competition used Python with a tiny bit of C code as appropriate.

He also has a longer list of MUDs with source, with languages including Python, Perl, Java, Lisp, Lua, C, C++, VB.NET, and C#. You'll note that a relatively small number are based on C or C++.


Share this post


Link to post
Share on other sites
I'm going to stick my foot in the door and recommend C#. If you want it to be cross platform and you're developing on Windows you can build against Mono from the start to ensure everything will work correctly. Mono supports Sockets so you should be fine there.

Since you're coding a MUD some of your clients are inevitably going to connect via Telnet. Due to that using a networking library would likely be utterly useless. You are going to be receiving packets containing single keystrokes, and you'll have to be able to handle that. Take a look at frob's links and look for an open source C# codebase. It would likely be easier (and more fun) for you to find one of those and just mod it to your heart's content rather than create your own from the ground up.

Share this post


Link to post
Share on other sites
I would like to thank everyone for their input so far. So, your saying it may not be worth using a networking library because of telnet clients? What do you suggest I should use to handle telnet clients? I will check those links out and look at other codebases, but any more input for mud design is also appreciated. I thank everyone for all their help :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement