marrow / jikca

A modern MU* server implementation in Python 3 using asynchronous networking and MongoDB object storage, with integral web-based client.
MIT License
2 stars 0 forks source link

Model core data structures. #3

Open Dbevan opened 5 years ago

amcgregor commented 5 years ago

Class (Type) Hierarchy

Jikca is an object oriented interactive fiction framework, persisting objects to a back-end database (MongoDB), and allowing interactive and API-driven manipulation of those objects within the game world. All objects are of some type, often referred to as a class. The root class that all game objects ultimately are a type of is: Object. It is possible to have instances of this base class within the game world; most actual objects will be of a more specific type in order to more strictly define the available attributes/properties, and to allow coding of additional behaviour. Base Objects are… dumb.

Object

Defines the properties and behaviours common to all in-game objects.

Attributes

Attributes are database-persisted values. While there is no direct behaviour as a result of changing attributes, interested other objects will be notified of the change and may perform some action themselves. Attributes fall into two distinct categories: core, defined by Python code within the server itself, and meta, or defined by users within the game world. Core are a fixed set, meta are free-form.

Core Attributes

Properties

Properties are programmatically defined attributes whose value is determined by the result of executing a function. They may be assignable, in which case a function is run (there is behaviour) to handle the assignment.