Hi, I was wondering how I could create a MUD (Multi-User-Dungeon) game using Python. It would be a dream come true if I could make one on my own so I was wondering if there is any reading material (pdf) that could teach me. What functions and commands would I need to learn?

Hello Jake 1,
While I don't have much game programming experience I can tell you about PyGame. It has a lot of components for GUI games, but I'm sure you can make text-based games with it as well. At a very minimum it will give you a more game-based place to look for the documents you said you wanted.

If you are looking at game programming in the future, if that is something you think you would like to do, I would also point you towards Unity 3D. A good buddy of mine has programmed in it for several years now and really likes it. It is simple, powerful and has a free version. You have the choice of programming in three languages: UnityScript (JavaScript), C# or Boo (Python-like).

I once started a text based game in python, never finished it but as far as advice I can give you on that, a thorough understanding of the basics is essential. Your basic print and input, functions, switch-cases, lists and classes are the places to start, you will use them constantly. Also, you should learn very well how to use multiple source files in your application; it will help exponentially in organization and simplifying your source code. A structure setup I would suggest is a main file that will run your whole game and a file for each level/chapter/story-line change/whatever you base your game on.

Another piece of advice I can give if you want to save and store game progress is to use a text file. Create it on the user's computer, read from it to set up the game and over-write the data when new information is unlocked.

I don't have a PDF file on it, but I hopefully have given you a little helpful advice and a couple places to start at. Let me know if I can help with anything else. May the source be with you.

  • James

Unity 3D

commented: Good answer! +14

Thank you James, I have actually considered the thing with the text to save. I have looked into PyGame and hopefully I may be able to add colour to the text as well. I'll leave the thread open as other answers may pop up, but many thanks.

These books may help you.

commented: Nice tip. +14
  • The standard library
  • pygame or the print function and os.system('cls)/os.system('clear')
  • This code:

    def keypress(event):
        global key_events
    def updatefunction():
        evnets = key_events
        key_events = []
        picture = ""
        #Actual game play code#
        #set picture to the image you need#
        print picture
    from tkinter import *
    root = tk.Tk()
    root.bind_all('<Key>', keypress)
    ##Execute Initializintion code for game##
    #the regular keypress event handler if using pygame#
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.