Jump to content
  • Advertisement
Sign in to follow this  
Vallar

Another MUD question?

This topic is 3413 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

Hello there everyone:), I know that this forum as much as all others has seen its share of the "I want to make a MUD help pl0xtnxbai". I can't by any means state that this won't be another one. However i know what to do but need some directions that is all. I was thinking of making my MUD with Python, simple, easy and fast (not faster than C++ so i could escape the flaming). I know how to program in Python but simple things, I haven't delved in OOP. The second solution is Visual Basic*, I know a fair share of it. I think I can pull off something with it. The question stands as... I know that using Visual Basic i could make something and produce alot of code fast (User register/login forms, Client form, characters and some areas. Don't know how i will make those now, but i think i can figure out how by myself). My heart is however is with Python, i spent about a year learning about loops, functions, sequences and so.. While it took me about 3 days to learn the equivalent in Visual Basic. Is there any resources that can get me up and running in Python? If the answer is yes, i am going to switch to Python, but i need something solid, something related to MUDs or at least Text-Based games. I have almost 3-4 books about "general" Python programming and currently learning Python from one of them. *An example of a MUD made by VB is www.kaldana.com. It is a great game if you want to play too. That is what i invention mine would be like. But much better since this is heavily PL gaming and less RPing.

Share this post


Link to post
Share on other sites
Advertisement
Follow your heart. :-)

For GUI I would recommend Qt4 for python. Take a look at this: http://wiki.python.org/moin/PyQt

The python tutorial should get you up and running pretty fast: http://docs.python.org/tutorial/

Writing a MUD server requires some knowledge about network programming. I would google for a simple chat client/server tutorial for python, and go from there. Maybe take a look at the twisted library as well. (http://twistedmatrix.com/trac/) It might save you a lot of coding, network-wise.

Good luck! Hope to hear from you soon,

c.

Share this post


Link to post
Share on other sites
Quote:
Original post by Vallar
If the answer is yes, i am going to switch to Python, but i need something solid, something related to MUDs or at least Text-Based games. I have almost 3-4 books about "general" Python programming and currently learning Python from one of them.

Unfortunately you are hoping for something too specific, ie. to find an article about a rare type of game being coded on a language not often used for such games.

If it helps, a MUD is basically a combination of two things:
- a chat server
- a text adventure

The first, you can find Python advice on. (There is even an asynchat module in the standard library to help with this, although writing one from scratch with just sockets and select is easy too.) The second, you will probably have to work out yourself, but is simple enough. Once you have worked out the basics of these, you just have to join it together.

Share this post


Link to post
Share on other sites
I hope my reply came soon ;).

As I see it, all favor Python. It goes with my heart's desire. But as Kylotan said it may be too specific. I searched Google more than 14 times with different combinations (basically containing Python, mud, guide/tutorial).
Nothing dare I say was helpful save one article I came on by chance. http://paranoid-engineering.blogspot.com/2008/11/python-mud-game-example.html

The engine looks good. I think (I have no experience). But building one from scratch would be more valuable to me. At least I would learn more about the language and programming as a whole.

On the other side. I started in VB (just to remind me of the language since last i checked it was like a year ago). In the past 3 hours i could make a web browser with little problems.

I also read the Eternal Lands guide in here. Speed and fast coding is something essential. Maybe VB isn't the best language but so is Python (in terms of communication speed between servers and clients). Also using a low-level language isn't that great. It takes lots of time because you have to handle alot of variables that can be just over looked in others. In VB's case I think placing things around (Like the windows and buttons, tiles and objects) would be easy. Just a click and drag with my mouse. No coding lines would be needed as in Python.

All in all, If i find one more guide with anything related to this topic. I would do it in Python. That article and the guide would help me understand how things work.

@Kylotan
The problem is in the coding of the later. I don't think there is anything that i can use in Pygame for reference. The chat client would be a little easier. But i can manage it (one of the books i have, had a project in the end which was a chat program like MIRC)

But not to forget... Thanks for the rapid reply. I will use the forums to issue out my progress. May others find such a topic as a guide on how to get a MUD done by either of those languages and save you some more of those questions.

Share this post


Link to post
Share on other sites
Question: Are you more interested in making a MUD from the ground up for its own sake or are you interested in making a game that is a MUD?

If your goal is to make it from the ground up then use whatever you please. If you are more interested in making an actual game as quickly and effectively as possible then perhaps you should look into some existing code bases and languages.

LPC is a language specifically designed for making MUDs and many mud code-bases (called mudlibs) use it. It's quite easy to pick up if you are familiar with programming in general. Currently, I'm working on a project that uses an LPC driven mudlib called Dead Souls.

Share this post


Link to post
Share on other sites
Both! That way i can learn programming and at the same time have a game that i would run...

The Idea of having a pre-made code crossed my mind. But then it rules out the learning curve. Also i don't plan to keep it a MUD for eternity. It has to develop at some time. I am just starting with a MUD because it is the easiest (I mean in the hierarchy of MMOs not in games as a whole). So getting a pre-made code might not be the best solution. I need to be familiar with the core programming for THE plan:

The plan goes as follows...
1- Create MUD
2- Use 2D elements in it (Like display characters on the user panels)
3- After sustaining the game and running it for some time i delve into a whole 2D overhaul.
4- 2D/2.5D conversion.
5- 3D MMORPG capable of hosting thousands of players.

Call it day dreaming or a nut job all you like. However that is the goal i am starting with. Unless i get a job with some company or some team that already having a MMORPG working around, I won't try to quite. That way i can at least support myself economically while doing what i love most. Economically of course being a long run from this point and haven't even thought about it yet.

Share this post


Link to post
Share on other sites
It sounds like you want to use Python and the only thing holding you back is the lack of a visual designer for GUIs a-la VB.

If that's the case, maybe this Python Gui Programming page will help. Looks like it lists a bunch of Python GUI libraries. IF you scroll down to the GUI Design Tools section you might find a visual designer you can use.

I'm not a Python user and cannot really vouch for anything listed on that page, maybe someone more familiar with the language can.

Hope that helps.

Share this post


Link to post
Share on other sites
It does help thank you. However what is hindering me really is the lack of documents that would teach you the technical things about making MUDs in Python. At least something that goes in the line.

Share this post


Link to post
Share on other sites
I can only repeat my recommendation for Qt4. It has a powerful designer which can be used. Now that Nokia is going to release it under the LGPL license, it can be used in commercial applications as well.

http://www.qtsoftware.com/images/products/qt-designer-screenshot-linux/image_view_fullscreen

c.

Share this post


Link to post
Share on other sites
Quote:
Original post by Vallar
However what is hindering me really is the lack of documents that would teach you the technical things about making MUDs in Python.


Honestly you're probably not going to find a lot of documentation on creating a MUD server in any language because, quite frankly, there isn't much to document. A MUD server is just something that accepts connections and sends and receives text; the vast majority of your code will deal directly with your game mechanics.

If I had to guess I would say that a lot of the appeal of MUDs from a programmer's perspective comes from this fact, and in turn they appeal to users because the programmers can focus purely on their game mechanics and usually offer innovative gameplay experiences that more complicated games simply cannot afford to.

For example, here's a bare minimum "mud server" in Ruby:

(Disclaimer: This isn't production quality code by any stretch of the imagination, it's only an example.)
require 'socket'

port = (ARGV[0] || 25).to_i
server = TCPServer.new(port)

breakhandler = proc { print "Shutting down\n"; server.close}
trap("INT", breakhandler)
trap("TERM", breakhandler)

print "Server started.\n"
begin
while (session = server.accept_nonblock)
Thread.new(session) { |arg|
Thread.current[:client] = arg
Thread.current[:client].print "Welcome to MyMUD!\r\n"
Thread.current[:client].print "Enter your username: "
Thread.current[:name] = Thread.current[:client].gets.chop
Thread.current[:client].print "Welcome back #{Thread.current[:name]}!\r\n"
names = Array.new()
Thread.list.each { |thr|
if (thr != Thread.main and thr != Thread.current)
names.push(thr[:name])
end
}
Thread.current[:client].print "The void\r\nYou are standing in a void, there are no exits.\r\nYou see here: #{(names.empty? ? "Nothing" : names.join(", "))}\r\n"
while (message = Thread.current[:client].gets)
case (message)
when /\/quit/i
Thread.current[:client].close
when /\/name (.*)/i
Thread.current[:name] = $1
when /'(.*)/
print "#{Thread.current[:name]} says, \"#{$1.chop}\"\n"
Thread.list.each { |thr|
if (thr != Thread.main and thr != Thread.current)
thr[:client].print "#{Thread.current[:name]} says, \"#{$1.chop}\"\r\n"
end
}
else
Thread.current[:client].print "Huh?\r\n"
end
end
}
end
rescue Errno::EAGAIN, Errno::EWOULDBLOCK
retry
rescue IOError
end



As you can see, it's little more than a chat server with a bit of flavor. Anything beyond this is really getting into the mechanics of your specific MUD. Try looking up chat server examples, sockets in general, and general game design and you'll likely find a wealth of information you can use in the process of writing a MUD server.

[Edited by - Puck on January 20, 2009 1:23:02 PM]

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!