How i would design a mud engine using a sql backend
Tables:
Areas: Areas become nothing more than a grouping unit. You can assign however many rooms to an area as you wish. This does allow you to do things like broadcasting certain messages to users who are in an area. Fields: id, name Rooms: Rooms are containers which hold instanced objects fields: id, name, description Exits: Define what exits exist for a room fields: id, roomid, direction, destiation id Objects: "Things" that are in the world, this includes players, mobs, a fountain in the middle of the town square, swords, etc fields: id, name, type Stats: stats on an object, str, dex, int, wis, etc. This lets us do 1 query to get the total stats of a player by adding his stats and the stats of all his eq fields: objectid, str, dex, int, wis, armor, hp, etc InstancedObjects: Objects which exist in the world. fields: objectid, roomid Inventory: Which objects are carried by a player fields: playerid, objectid Skills: Defines actions that "do things" punches, sword swings, magic spells. One idea here is to have a field for a callback function for tricky spells or functions which cant use a generic spell or attack framework fields: id, type, damage, etc, callback
And I think the best part is the fact you dont have to keep up with vnums or anything like that. If you want to edit using a filesystem approach there are FUSE plugins that allow you to interact with a rdbms