Brane Object Model
Avvyland is a world made of objects. The objects are represented both visually, in the form of building blocks, user avatars, etc., and logically, as an entity in the blockchain that describes an object and its details via a smart contract. Every object has rules that govern its properties and behavior.
To define the logical structure of Avvyland's 3D space, we have developed the Brane Object Model (BOM).
TERM: Brane Object Model (BOM) is a universal logic underpinned by two principles: All entities in Avvyland – blocks, hyperlinks, Branes, and user avatars – are related to each other in various ways. All the objects in a Brane form a hierarchical, tree-like database.
The objects are located in a three-dimensional orthogonal grid composed of uniform cells.
We have also defined BOM's three key principles:
- discreetness: any action in the Brane is a discrete (separate) transaction. This is a unique solution that allows every operation involving a 3D object to be registered in the blockchain (for more details see the Decentralized Architecture section).
- orthogonality: the objects are always uniformly located in an orthogonal grid. This makes it possible to determine the unique location of any object in the grid or inside another object.
- universality: objects of all kinds can have various appearances and behavior, but all are described in the same way in accordance with the same rules, and located in the building space in a uniform manner.
Let us clarify why we introduced BOM in the first place.
BOM's main purpose is to make it possible to process 3D objects as a hierarchically structured database. As a result:
- 1.we have a work space presented as an immersive 3D world
- 2.operations with objects are executed quickly (as the location of all objects in the building space is unambiguously known)
- 3.operations are processed on the server-side (as processing is fast)
- 4.using thin clients (as processing is performed by servers) is more efficient and doesn’t require downloading
- 5.all operations can be saved on the blockchain thanks to their discreet nature
- 6.the blockchain can be used as a system for recording all operations with objects
BOM facilitates three fundamental capabilities:
- 1.to code each object with a smart contract
- 2.to validate and store transactions separately in the blockchain
- 3.to process large quantities of data quickly
The virtual world inside the Brane space is created by filling the 3D orthogonal grid with life-like objects from a user inventory. The grid is composed of uniform cells and forms an addressing system where every object has its own unique address, which is recorded in a stored index. This standardization makes it easy for users to perform operations with objects and allows the server to execute them quickly. The user configures the objects' properties, adds objects to the grid, and interacts with the structures they have built. The server, in turn, validates and applies the user’s actions.
The smallest cell in the grid is a 4x4 inch cube. Each cell has a unique address registered in a special section of Avvyland's database. Each object placed in the Brane occupies a certain number of adjacent cells. This approach makes it possible to establish a consistent addressing system.
NOTE: The 4" by 4" cell is used as a standard unit in the building space of the Avvyland web application. The size of this space is set in inches in the application: Settings → Render distance. For example, a value of 100 means the building area is visible within a 100-inch radius of the center.
The cells can contain objects of any type.
Objects are the main logical elements in Avvyland. Any logical entities in Avvyland are represented as 3D objects of the following types:
- Brane: an object that contains all basic objects and users
TERM: A Brane is a virtual 3D space that visually represents an immersive DApp (IDApp) – a core component of the Avvyland framework. To learn more about immersive DApps and how they work, read this article.
- User aka Player: an avatar (Avvy) that represents a real user. It has the following purposes: to visually represent the user in the Brane and store inventory as child objects, as well as send and receive messages in accordance with the actions of the real user.
- Basic object: any other object in Avvyland (blockcell, block, media block, etc.)
TERM: A blockcell is a child meta object that consists of a map of arbitrary properties and an index that unambiguously identifies the blockcell in the object's local space. Blockcells are used by objects to communicate with each other and store metadata, e.g., specific location of the object, and subscriptions to messages.
TERM: A block is a basic object in a Brane. It is a logical entity with an indefinite number of parameters, which includes one or several logical units called blockcells.
In addition to operating with objects in the Brane, users can also create and program their own objects. We have also developed intuitive no-code services for content creation based on these BOM principles:
- 2.Objects' properties, behavior, and logic are set in a domain-specific language (DSL) service. To make it easier for users to configure objects, DSL is implemented as a high-level programming tool, in which all operators are intuitive and easy to understand.
All objects are smart, meaning they can be stored in the blockchain as a logical structure. After their properties and behavior are predefined in DSL, these objects will be able to trigger the execution of smart contracts.
TERM: A meta block is a special block controlled by AI. Meta blocks can generate their own visual appearance and properties depending on the conditions set for them.
TERM: Player is an active user of the Brane. The player's avatar is placed in the Brane and occupies certain cells, just like any other object.
All objects have different relations with one another. For a description and examples, see the section below.
All objects are arranged inside a standardized grid. In this section, we will consider how this arrangement works in practice.
Every cell in the grid has a unique address, i.e., coordinates. Objects are located in the Brane in accordance with the orientation of the cells.
Once an object or part of an object has been placed in a cell, the object has a unique address identical to the cell's coordinates. Every object's address is registered in an address index in a designated part of Avvyland's storage system. Once the object has a unique address, no other objects can be placed in the cells it occupies.
Once created, objects are related to one another in various ways. These relations involve:
- physical location, i.e., 'parent-child' relationships
- ownership that defines the rights of the owner to control the object and modify its properties, i.e., ownership relationships
- all other types of relationships that appear depending on the operational context
Example: A Brane itself is an object, and its user has an Avvy inside it, which is an object as well – these two objects are a 'parent-child' relationship, where the Avvy is the child of the Brane it resides in. The user also owns objects representing a tulip and soil, which are located in their inventory. The user adds the soil object to their Brane. Thus, the Brane and the soil are now in a 'parent-child' relationship. Then, the user plants a tulip in the soil. Thus, the soil and the tulip are now in a 'parent-child' relationship. Then, the user picks the tulip and puts it back into their inventory. Now, instead of being a child object of the Brane, the tulip is a child object of the user’s Avvy again.
NOTE: Any object can be a parent or child of another object in the object hierarchy.
Every action performed on an object is registered in the blockchain as a transaction. This begins as soon as the Brane is created.
As the player's avatar itself is an object, it occupies certain cells at specific times. Like with objects of any other type, an Avvy's movement through the Brane, its current location, configuration, and status is registered on the blockchain.
Objects are nested in other objects via parent-child relations, so any object located in the user's inventory is a child of the user's Avvy object.
NOTE: Branes do not have to have a parent object, but can be child objects nested in other Branes.