Generic Activity Framework
Editor • Default Loading Phase





Prerequisite information
Plugin overview
The Generic Activity Framework is a collection of interlinked boilerplate C++ classes that set the stage for scalable hierarchical activity processing using GameplayTags.
The framework primarily wants to:
Maintain a rich degree of possible static usage contexts while not being overly generic.
Provide channels of extensibility with something ubyte.dev calls GameplayConcepts.
Beginning/ending activities
In short, there are 3 main interfaces: IGenericAgentActivityWorker
, IGenericCrowdActivityWorker
and IGenericWorldActivityWorker
. Each of them are able to begin activities, which are expressed as GameplayTags.
From this framework’s perspective, only the following is known:
IGenericAgentActivityWorker
runs a FAgentActivity
 one at the time (non-virtual). The actual implementation of the activity itself is delegated to a pure virtual impl
method.
The framework does not preconceive what these activities actually mean. For example, IGenericAgentActivityWorker
only knows and manages the beginning/ending of an FAgentActivity
 without further inclinations.
Likewise, IGenericCrowdActivityWorker
can only run a FCrowdActivity
, and IGenericWorldActivityworker
only a FWorldActivity
.Â
/** Backbone for all FAgentActivity workers */
class GENERICACTIVITYRUNTIME_API IGenericAgentActivityWorker
{
GENERATED_BODY()
...
public:
/** Process a new AgentActivity */
void BeginAgentActivity(const FAgentActivity& InAgentActivity);
/** Immediately stop the current AgentActivity */
void EndAgentActivityImmediately();
...
private:
/** Implementation body of BeginAgentActivity */
virtual void BeginAgentActivityImpl(const FAgentActivity& InAgentActivity) = 0;
...
};
Cognition tags
Each activity worker has methods for keeping their own Scoped/Persistent Cognition tags, which are GameplayTags mapped to a specific base category. They may encapsulates anything from knowledge, reasoning, to memory.
Scoped Cognition tags are automatically removed when the current activity ends.
Persistent Cognition tags remain unless manually removed.
ubyte.dev endorses creating GameplayConcepts extending Cognition that: