SDL_net chat server

Published October 15, 2006
Advertisement
Ok. I am going to try to get this right this time.

I am a big fan of text based MUDs. I got my start playing ROM based MUDs when I was about 17 (over 12 years ago!). There have been many improvements made to IDE's and compilers along with their free availability which helped decreased the need to have a remote host that had all of the build tools. The broadband boom has made it cheap and convenient to develop and test MUDs on a home computer through either a cable or DSL connection where traditionally they were hosted on college servers and low cost commercial servers because broadband in the home was pretty expensive.

I wanted to see how difficult/easy it would be to re-write one of these monsters from the ground up. Most of the popular hack n' slash style MUDs I have played are based on the Diku->Merc->ROM family which are written in C. Most have had so many different programmers that they have become a mass of spaghetti code that requires an in depth knowledge of the code in order to add or modify some of the simplest things. I hope to change that.

Starting off last night because of a post in the beginners forum regarding a simple chat server I began writing some code.

Here is what I wrote down as some needs:
1. cross platform code to be run on the major platforms of Windows, Mac and *nix.

2. C++ standard library containers and strings need to be utilized instead of the traditional home brew versions. Save on some time and bugs.

3. An embeded database system instead of flat files. Not everyone has access to or wants to set up and maintain MS SQL Server or MySQL and flat files turn out to be very cumbersome when adding fields to objects.

With that in mind I came up with these solutions:
1. SDL and the SDL_net library. SDL and it's add-on libraries are proven to be cross platform and pretty solid and best of all the S in SDL stands for "Simple". Why look any further.

2. Nothing here to explain. This is the reason STL became a standard in the first place.

3. SQLite3 is actively being developed and I have had some success converting older ROM based MUD flat files to this embeded database system in the past. A giant side bonus to this is that newer versions of PHP have a built in interface to the SQLite3 library to easily integrate game information into your web pages. A thin wrapper around this will need to be developed.

So... last night I wrote a simple multi-user chat server using SDL_net. The code is linked here.

Next is to add some more functionality like loging in and password recognition.
Previous Entry progress
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement