OrangeTide / boris

Boris MUD - a small C plugin-based MUD for RPI or deep adventuring
http://gitlab.com/OrangeTide/boris
ISC License
12 stars 2 forks source link

store objects in LMDB #7

Open OrangeTide opened 2 years ago

OrangeTide commented 2 years ago

use LMDB to store game objects.

OrangeTide commented 2 years ago

recommend that objects be stored in SExp format. see https://people.csail.mit.edu/rivest/Sexp.txt

Objects have an internal ID that is globally unique, like an inode. This is the key for the row in the database and isn't normally visible to MUD builders. Externally objects appear to have a full path. Room-like objects might have a path like: /zones/big_castle/potato_cave/entrance

Implementation is as follows: In the object's data (SExpr or JSON) are properties dedicated to representing a folder/directory structure. See https://www.mongodb.com/docs/manual/applications/data-models-tree-structures/ for how this can work.

A utility function to convert an object path name to internal key representation will be useful.