Jump to content
  • Advertisement
Sign in to follow this  
ScipioofTechnobabble

[java] Java Novice seeking online guide for MUD making

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

For some background: I have a semester of Java experience and want to try making a VERY simple MUD(Multi-User Dungeon i.e. text based game). I understand I'm in over my head and spent the last few days on google looking for where to start anyway. The question: Where can I find a good online guide on how to make a VERY simple MUD? Any extra advice is appriciated. Thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement
I can't provide you with a guide for a MUD, but I can tell you what you need to do before doing a mud. Program a client/server chat program, very simple on that has no GUI and operates in command prompt. Of course, if by simple you mean that there is not client/server, instead just a single program, then scrap what I just said.

Though a big question you should figure out how time based your system will work if it is just a one player thing. Will it update every time the player does something or will it be real time?

Share this post


Link to post
Share on other sites
Thanks for the post, I guess I'll start looking for a guide on making a chat room.

For simple I want to make a private game I could access from the internet and possibly have a friend access, but not something completely public and commercial.

For the "big question" I want it in real time.

Anyone who can link a guide on MUD making or chatroom making will be appriciated, I'll be googling and checking back now and then.

EDIT: Also, would something like freewebs.com be able to host for these experimental online programs, or will I need to open my wallet and buy a site?

EDIT2: I found this site on chat room design (only scannered it so far) http://www.acm.org/crossroads/xrds6-1/ovp61.html it may be helpful for anyone with my same problem who's watching.

EDIT3: I read through the article and I'm not sure if it helped or not =( I put it into a program to see the result and got nothing. Google here I come.

[Edited by - ScipioofTechnobabble on June 16, 2008 7:04:17 PM]

Share this post


Link to post
Share on other sites
If you plan on making any sort of network applications in Java, you need to be comfortable with multithreading in Java first. Also if you want your application to run in real-time having a good knowledge on multithreading is a major plus. Luckily, multithreading is relatively simple in Java, just read the tutorial here for a good start :
http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html


Then you will need to decide if you want to use RMI or pure sockets for your network communications. Basically RMI is easier to use, but slower that using pure sockets. Here is a good article that present both RMI and sockets :
http://www.ecst.csuchico.edu/~cmorris/csci278/tutorial.html#_Toc9223642


For making a chat application in Java you can check out this article at Javaworld :
http://www.javaworld.com/jw-01-1997/jw-01-chat.html?page=1


This example use sockets and some AWT for a GUI though, but it also cover a lot of design principles about how to make a chat application.

I hope those links will help you a little on getting started with your project!

Share this post


Link to post
Share on other sites
Might I suggest the opposite of what most people here are suggesting. Build a standalone MUD first basically a single player text-based RPG with Real-Time components this will get you settled with basic command prompt coding. The reason I suggest working on the game first without networking is so you will have something to show for your labor.

If you have created a chat client and server before and messed at least some with ServerSocket and Socket classes then I would go with the suggestions already given.

Share this post


Link to post
Share on other sites
Thank you for the advice and links! I'll start reading those and hope it'll keep me busy for a while =)

I would love to try 5MinuteGaming's advice, but I know I need to get some more experience/practice first.

Until I finish reading these links my only remaining question is "would something like freewebs.com be able to host for these experimental online programs, or will I need to open my wallet and buy a site?"

Share this post


Link to post
Share on other sites
freewebs and other hosting sites are strictly for websites and HTTP, PHP, JSP, ASP servers. A MUD server runs as a standalone application and web hosting sites to not provide a means of running a server.

For testing purposes you can run the server from your own machine and use that as a host machine all you need to be able to run a client remotely is the ip address of the host machine as visible from the internet google "my ip" and the specific port number the server is using to listen for incoming connections.

If you have a wireless router or are behind a firewall or have your personal firewall setup you will have to configure it to allow traffic for the specific ports used by the server.

Share this post


Link to post
Share on other sites
I have actually tried to do a MUD several times in Java to no avail. I have now moved on to Python.

You need to do two things to succeed.
1. Successfully network your program
2. Make the MUD itself

Number 1 is pretty doable. You will need to use the ServerSocket and Socket classes. Assuming you want more than 1 user to log on, you will also have to use multi-threading, which is done through the interface Runnable or the class Thread. (Read up on those)

Number 2 is much more difficult. You will have to decide what sort of classes you want; i.e. how much OOP you want. You can whip up a simple MUD easily, but it may not be as extendable as you will later need. Or, you can make everything super generic, so you can extend it later, but this is much more difficult to do and will take more time.

However, you do it, I wish you luck! Let us know how it goes!

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!