Online text based game

Started by
9 comments, last by Chedburn 20 years, 2 months ago
Mine is still heavily under development. I currently have working user login/logoff, rooms and account creation. So far I am tweaking the server and removing a hand full of bugs before moving on.

As storage I use a MySQL server using a self written MySQL wrapper class that directly connects to the database(MySQL DAO v0.1.3) using the MySQL API. This has some advantages over using files, since data storage is handle by an external application. And the library built in type conversions, so data can be retrieved with great ease:

CMySQLRecordset Res;Res = Database.OpenRecordset("SELECT * FROM ROOMS");Room.Name = Res.FieldToChar("R_Name");Room.Id = Res.FieldToLong("R_ID"); 


The MUD itself is written in C++, running in an empty Win32 window. This will later on be replaced to make it a service. This will make the MUD server start on server boot.

Data for a user is maintained "online" in the MUD''s memory. This has the advantage that user data is much more quickly accesseable that needing to retrieve it everytime from the DB for checking/updating. The data is forcefully stored after each 60 minutes of online time for a user. When a user disconnects, it''s profile is saved aswell.

I do not plan on handing out the source, at least not in it''s current form since it''s buggy, not well coded and under development. Best would to take an existing code base, such as ROT, CircleMUD or whatever.

Toolmaker

ps. If you plan on making your own MUD, start with sockets first, and read the first chapter of MUD programming book(It''s in the article section) and Andrew Russell''s MUD pies part 1.



-Earth is 98% full. Please delete anybody you can.

This topic is closed to new replies.

Advertisement