Closed selfsame closed 9 years ago
A game scenario is constructed from: json entity definitions component lifecycle functions actions verb registration *dialogues
The scenario module imports the various libraries and files in it's init.py Load order is important for actions, and possibly verb registration
The scenario folder would look something like:
game/
__init__.py
standard/
module1/
__init__.py
feature.py
special.json
single_file.py
data/
stuff.json
Actions and verb registration is pretty much ready for this.
.json data should be good, it doesn't rely on order and the whole game directory can be scanned.
component functions need to be rethought, they should be registered on import and not depend on a unique file per lifecycle.
There should be probably be a single from foo import *
that covers the bare requirements for registering actions, components, and verbs (maybe also act
and say
).
It would also be nice to avoid having to include sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
in every file.
closing with 6796ba4807e475a8b10cdb196696a4d3e632c3e8
modules inside of the game package can use from mud.core import *
for the essentials
.json data lives in mud.game
now
There should be a specific 'scenario' directory where actions, component functions, dialogues, and entity .json are placed. the core libraries should maybe be consolidated.