Architecture

Uncover the inner workings of the Atomix Plugin's Architecture.

Atomix's architecture is complex, so understanding how the different parts communicate will help you get the most out of it.

Although it is complicated under the hood, our end goal is to provide the end user with a straightforward and intuative way to interact with the system. Providing this without placing the burden of limetimes and instantiation on the user means things may be difficult to follow at times. Here is an overview of how things work, behind the scenes.

Below you will see a hierarchy of layers. Unless you spend some time looking into the source code it won't mean much. Which is okay, you don't have to do that.

If there's only one thing you take away from this is; If it's hard to get to then it's for a good reason.

The Architecture

GameState
UObject

The GameState is where Atomix is instantiated. This is for multiple reaons but mainly due to replication limitations and lifetime requirements. This class does some of the heavy lifting, interacting with the PlayerStates and replicating its own data.

Orchestrator
Native

This class is responsible for the lifetime of the layers below. Think of it as a manager class. This serves no purpose other than to start and stop Atomix safely. There is no need to directly reference this in your codebase.

Shell
UObject

This is where the API is exposed from. It is a UObject which means it can be used in BluePrints as well as in C++. It's lifetime is managed by the Orchestrator and subseqently because it is a UObject, Unreal's garbage collection. This is the object you want to access to perform operations on the ECS and its underlying framework. You can get a pointer to this from the GameState at anytime, ideally after it is initialized.

Domain
Native

This layer is responsible for actioning the API requests down to the Platform. It has many different Modules, each individually responsible for something. They interoperate and call one another to perform actions. This is where you will find the most complicated aspects of this plugin.

Platform
Native

This contains the Registry, the ECS Platform, where the data is actually stored. Well away from prying eyes.

PlayerState
UObject

As the name implies, this is a class derived from the standard Unreal PlayerState. It is primarily used for replication but there are some other functionalities.