Navigation
API > API/Plugins > API/Plugins/Mover
RollbackBlackboard: this is a generic map that stores any type of data for local-only access. It will not be replicated. It can be used as a way for decoupled systems to store calculations or transient state data that isn't necessary to reconstitute the movement simulation from scratch. Examples: the normal of the current walkable floor, or time of the last movement mode change
Key Features:
- Rollback support: when movement simulations roll back during a correction, this blackboard also rolls back to previous values.
- Concurrent access: for async simulations, it provides concurrent access support so external systems / scripting can access data while new data is being authored
- Policies: there are a variety of policy options to control buffer sizing, invalidation behavior, and entry persistence.
Notes:
- This is implemented under-the-hood using circular buffers, alleviating the need for mem alloc/frees during use. It's important to create entries with policy settings appropriate for their use pattern.
- We use an "InternalWrapper" class to allow in-simulation objects like movement modes to use the same API, without needing to choose between internal- or external-facing functions.
- The "InternalWrapper" class will be replaced by a different pattern to govern access levels TODO:
Implement stronger concurrency controls at time of frame changes, and when new in-sim entries are written
- Implement sizing policies that rely on knowing a max number of elements to buffer (the backend may know these details)
- Consider using TArrays instead of circular buffers, due to the power-of-2 trick potentially wasting a lot of memory
- Expose for Blueprint use Determines how a blackboard's entry buffer is sized
| Name | EBlackboardSizingPolicy |
| Type | enum |
| Header File | /Engine/Plugins/Experimental/Mover/Source/Mover/Public/MoveLibrary/RollbackBlackboard.h |
| Include Path | #include "MoveLibrary/RollbackBlackboard.h" |
Syntax
enum EBlackboardSizingPolicy
{
FixedDeclaredSize,
FixedBackendBufferSize,
SingleEntry,
}
Values
| Name | Remarks |
|---|---|
| FixedDeclaredSize | Buffer size is set at a given number and and never changes |
| FixedBackendBufferSize | Buffer size matches the backend simulation's history size, determined by ticking rate and history settings. |
| SingleEntry | Minimizes data size for blackboard entries where thread contention and rolling back shouldn't change the value. |