Arcadia Engine Concepts and Terms
Introduction
This is the documentation for Michael Heilmann's Arcadia Engine. Arcadia Engine is the module upon which a game engine is based on.
Concepts and Terms
This section is an introduction to capabilities and concepts of the engine.
Nodes and node traversals
The engine is built around a unified node-based architecture. Every element of a game - materials, meshes, audio sources, animations, physics components, and even gameplay logic such as triggers or state machines - is represented as a node. The engine operates by visiting these nodes. Dedicated visitors handle specific concerns: one visitor renders visual content, another one emits audio, yet another one updates physics, and others evaluate gameplay logic or AI. Each visitor interprets and transforms nodes according to its domain. A game, therefore, is a structured collection of interconnected nodes loaded from a declarative description. During runtime, the engine continuously traverses this graph, with its various visitors updating, rendering, and evolving the state of the game world frame by frame.Retained State
When evaluated, nodes update a retained state representation of their audio-visual aspects in the currently selected video and audio backends. Examples for a backend is for example the OpenGL backend and the OpenAL backend. That is, the backends contain a fully representable presentation of the audio-visual rendering of the names at a particular point of a particular iteration. This allows to decouple the frequency of node iterations from the frequency of video and audio presentations of the retained state to the user. For example, nodes might update their graphical representations only 4 times per second whilst the retainted state is rendered at 120 frames per second.
Backend Context and Retained State Re-Creation
Notes are visited and update the retained state. The retained state is a backend-specific state. That is, the retained state is tied to a particular video APIs (OpenGL, Vulkan, Direct3D) and to particular audio APIs (OpenAL, Bass). When the engine - for example due to a user changing the settings - makes a substantial change to a current backend (e.g., switching from windowed to fullscreen mode) or switching the current backend altogether (e.g., from OpenGL to Vulkan), then the nodes ensure that their retained state is re-created.
Examples of Nodes
This section provides a growing collection of currently known nodes to illustrate the node concept in action.
Model Nodes: A model consists of a mesh node and a material node. Furthermore, it consists of a local space to world space transformation. Model nodes are static, that is, they can not move. In general, scenes are made up of model nodes.
Mesh Nodes: A mesh node consists of a list of vertices. A vertex is made up of a position in local space, a per-vertex ambient color and a per-vertex ambient color texture coordinate. Furthermore, a mesh provides a per-mesh ambient color.
Material Node: A material node consists of an ambient color texture. Furthermore, it has a flags which determines the source for the per-fragment ambient color. This flag can assume three values:
- the per-mesh ambient color is used
- the per-vertex ambient color is used
- the ambient color texture is used In that case, the per-vertex ambient color texture coordintes are used for texture mapping.
In usual engine scenarios, only the last flag, using the ambient texture color, is relevant.
Texture Node: A texture node consists of a pixel buffer node.
Pixel Buffer Node: To be done
Viewport Node: To be done