I would like to make a MUD in C++. So...=) I need to know how i would program it so that other players could attack, see, and trade with each other. I'm gonna host it on my computer, or maybe a remote shell account, so my friends and i can play and work on it. I know i would need to use sockets or something, but not sure =\. Could someone give me a code example of how this would be done? Maybe just like a chat room type thing so I could see how It works??


Thanks ALOT. ~

~Kodiak

Recommended Answers

All 2 Replies

I would like to make a MUD in C++. So...=) I need to know how i would program it so that other players could attack, see, and trade with each other. I'm gonna host it on my computer, or maybe a remote shell account, so my friends and i can play and work on it. I know i would need to use sockets or something, but not sure =\. Could someone give me a code example of how this would be done? Maybe just like a chat room type thing so I could see how It works??


Thanks ALOT. ~

~Kodiak

Coding sockets aren't just a one-post length thing. Go download SocketMUD which is a C/C++ barebones MUD codebase. It has pretty much nothing but the sockets so you could see how they work that way.

Side Note: I've seen a few posts about making MUDs and you can't imagine how happy I am that people are still finding interest in them with the age of next-gen. *Holds up his fist* Keep the movement alive!

Have a look at Beej's guide to network programming. Its geared towards linux, but much of it applies to windows programming too

http://beej.us/guide/bgnet/

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.