• Advertisement
Sign in to follow this  

MUD in C#

This topic is 3944 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'm attempting to program a small text MUD(multi-user dungeon), from scratch, as I've already written small games for C#, but I don't really know where to start. Basically, I want the game to played through telnet, with a C# server controlling the data sent/received. Here's a few questions I have for, anyone, that might be experienced in this field, or at least less clueless than me! :) -What would I use for the player connections? Winsock? Or does C# have something better built-in? -What is best for a character files/player database, MySql? Ini Files? Something else? -Do you know of any sites, tutorials, links, books that cover any of MUD topics or online-game programming in specific? I would be most grateful. And to prevent flames, yes, I am using Google to find these answers, but I thought, that a live person may be able to help me faster/more efficient. Thanks for your time.

Share this post


Link to post
Share on other sites
Advertisement
1) You can use the sockets built into the .Net framework in the System.Net namespace. I have no clue what Telnet involves, but I seem to remember it being pretty simple. There might even be code available online that already handles anything telnet specific.

2) How big is this going to be? If it isn't too large, I might just use Serialization (google it) to store the data when the MUD is off and keep everything in memory otherwise.

If it is big enough that you definately need something better, use SQL Server Express for it's really good integration with the VS IDEs.

Share this post


Link to post
Share on other sites
If you're planning for small number of users ( < 64), regular sockets will do.

Otherwise it's really worth looking into IOCP (IO completion ports), or a library that supports them. They are the optimal solution right now ( at least for Windows ), and can handle hundreds of users without a hitch.

For storage, it depends on the complexity and structure of your objects, as well as numbers.

Files are fine, so is SQL, an in-memory database might work. Each has advantages and disadvantages. For MUDs, any of them will work, due to light load, you can probably keep all the data in memory as well, just store it every once in a while.

For tutorials, look on this site under resources, there's some books, also search google for MUD sources - there's plenty of them around in just about every language.

Share this post


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

  • Advertisement