🎬Behaviors

Behaviors are ‘controllers’ of Morpheus.

Behaviors are intangible elements of the Place that control Objects (including Avatars) by changing their state or simply sending them commands. Behaviors also listen to what is happening with Objects and react on it.

Behavior, not Behaviour

We use not ‘behaviour’ (which is a proper British word) but ‘behavior’ (which is American, shorter, and industry standard).

The word ‘behaviour’ we use in the context where we actually talking about behaviour of something. E.g., ‘user behaviour’, or ‘the behaviour of this object’.

Why Behaviors

True platform should allow not only to add different kinds of Content like Worlds, Artifacts, and Avatars, but also to implement interactive behaviour of such content. This must be done neither by changing client apps nor by changing backend servers.

Third-party developers should be able to make interactive objects and host their code (scripts) on their own servers. And our platform should give them tools to connect those scripts to Artifacts.

Behaviors focus on separation of custom interactivity from platform features.

Object and Behavior Separation

The core concept behind our interactivity framework is separation of ‘tangible’ and ‘intangible’ worlds. It is very much alike ‘model-view-controller’ or ‘presentation-abstraction-controller’ patterns and separates phenomena that can be experienced ('objects’) from phenomena that can not ('behaviors').

Object

Usually visible and tangible object.

  • Artifacts are spawned in Places as Objects.

  • Users present in the Place are represented by their Avatars.

Behavior

Invisible and intangible substance that controls Objects.

  • Users control their Avatars directly and interact with other objects in the Place.

  • Objects can be also controlled programmatically by Behavior Scripts.

Connecting Behaviors and Objects

Behaviors are located in the Places in the same way as Objects. They connect with Objects by three ways:

  • Attaching to an Object.

    • The Object becomes behavior’s host.

    • The behavior becomes Object’s behavior.

    • To exist in the Place, a behavior needs to have at least one host.

  • Listening to an Object.

    • The Object becomes behavior’s source.

    • The behavior becomes Object’s listener.

    • Behavior will receive all messages issued by its source.

  • Controlling an Object

    • The Object becomes behavior’s subordinate.

    • The behavior becomes Object’s controller.

    • Object will act out every message that it receives from its controller.

Behavior can be connected to several Objects by any number of ways. E.g., a behavior can control several Objects.

Vice versa, Objects can be connected to several behaviors in the same of different ways. E.g., an Object can serve as host for several behaviors.

Examples of Connected Behaviors

Last updated