Esherymack / CSMud

MUD project for CS320
GNU General Public License v3.0
1 stars 0 forks source link

Player and World Persistence #16

Open Esherymack opened 5 years ago

Esherymack commented 5 years ago

There will be a database of players including a Username, a Password, and the player's generated User object. The User object will be pulled from the database upon providing a proper user-pass combination. User object is serialized on login, flushed to database on logout.

The world persists insofar as its World object is stored.

Players persist despite the current world state including current room, current inventory, etc.

Unique items Crafted items, if placed in the game world, do not persist outside of a server reset. Crafted items in inventories, equipped on players, and held by players do persist. Legendary Items, where only one exists in the game world, if in a player's inventory, stay in that player's inventory. If they are not in the player's inventory, held inventory, or equipped inventory, it will remain in its place in the game world.

For testing purposes, a hard server reset will be implemented. This feature will reset the player DB and world DB.