Architecture¶
GASPALS is built from three layers:
- The pawn owns movement, input and the meshes, and exposes its state through an interface.
- System components (camera, cover, equipment, first person, overlay, ragdoll, traversal) sit on the pawn. Each one is self-contained: it reads what it needs from the pawn and its own settings, and handles its own input actions.
- Anim Blueprints pull the pawn's state every frame and turn it into a pose, with layers linked in by the systems.
flowchart TB
subgraph Framework
GM[GM_Sandbox<br>pawn and character lists] --- PC[PC_Sandbox<br>pawn switch, teleport]
end
subgraph PawnBox[Pawn: SandboxCharacter_Mover / _CMC]
Move[Movement<br>CharacterMover or CMC]
Meshes[UEFN mesh, first-person logic mesh,<br>VisualOverride child actor]
Systems[System components<br>Camera, Cover, Equipment, FirstPerson,<br>Overlay, Traversal, Ragdoll, VisualOverride]
Iface[BPI_SandboxCharacter_Pawn<br>Get_PropertiesForAnimation / Camera / Traversal]
end
ABP[Character Anim Blueprint] -->|pull every frame| Iface
Director[Camera director] -->|pull every frame| Iface
Systems -->|link anim layers,<br>attach items| ABP
Systems -->|read state| Iface
GM -->|spawns| PawnBox The pawns¶
| Pawn | Base class | Movement |
|---|---|---|
SandboxCharacter_Mover | Pawn | Mover (CharacterMoverComponent) with Network Prediction |
SandboxCharacter_Mover_Ragdoll | SandboxCharacter_Mover | The same, plus physics-based ragdoll, takedowns and shoves |
SandboxCharacter_CMC | Character | Character Movement Component |
The pawns offer the same features; they differ in how movement, prediction and replication work. See Mover and CMC pawns.
Each pawn has:
- a UEFN mannequin mesh running the character Anim Blueprint (the animation source for every character);
- a hidden first-person logic mesh (
SkeletalMesh_FP) running the first-person Anim Blueprint; - a
VisualOverrideChild Actor component for retargeted characters; - a Gameplay Camera component (and a legacy spring arm camera used only when Gameplay Cameras are turned off);
- a Motion Warping component for traversal;
- the system components below.
System components¶
| Component | System | Initialized with |
|---|---|---|
AC_OverlaySystem | Overlay poses and body styles | the third-person mesh |
AC_EquipmentSystem | Items in hand | pawn, third- and first-person meshes, the visual meshes to attach to |
AC_CameraSystem | Perspective, camera attachment, crosshair | pawn, visual meshes, Gameplay Camera component |
AC_RagdollSystem | Ragdoll (CMC pawn) | pawn, mesh, capsule |
AC_FirstPersonRendering | First-person meshes and visibility | (builds itself from its settings) |
AC_CoverSystem_Mover / _CMC | Cover | pawn |
AC_TraversalLogic, AC_TraversalTracer | Vault, hurdle, mantle | (reads the pawn on every attempt) |
AC_VisualOverrideManager | Visible character | (reads the game mode's list) |
AC_SmartObjectAnimation | Using benches and other smart objects | (finds the movement component) |
AC_FoleyEvents | Footstep and movement sounds | (called by animation notifies) |
Components that react to input bind their own input actions (AC_CameraSystem handles the perspective keys, AC_EquipmentSystem the equipment menu, and so on), so adding a component adds its controls. They only receive input when the pawn is player controlled.
Initialization¶
Systems are initialized by the pawn, through the interface BPI_ModularSystems and its event InitializeModularSystems. The pawn calls it at the end of BeginPlay, and AC_VisualOverrideManager calls it again whenever the visible character changes, because the meshes change.
sequenceDiagram
participant P as Pawn
participant FP as AC_FirstPersonRendering
participant O as AC_OverlaySystem
participant E as AC_EquipmentSystem
participant C as AC_CameraSystem
participant R as AC_RagdollSystem (CMC)
participant Cv as AC_CoverSystem
P->>FP: UpdateFirstPersonVisuals (connect logic mesh, build FP meshes)
P->>O: InitializeSystem(mesh)
P->>E: InitializeSystem(pawn, meshes, visual meshes)
P->>C: InitializeSystem(pawn, visual meshes, camera)
P->>R: InitializeSystem(pawn, mesh, capsule)
P->>FP: InitializePrimitives
P->>Cv: InitializeSystem(pawn)
P->>Cv: bind OnCoverVaultReady → traversal Because the event can run several times, every InitializeSystem is written to be safe to call again. Follow the same rule in your own systems.
When a player possesses the pawn, a client RPC runs SetupCamera (activates the Gameplay Camera for the player controller) and SetupInput (adds IMC_Sandbox).
Per-frame data flow¶
Data is pulled. The pawn implements BPI_SandboxCharacter_Pawn with getters that assemble its state into structs:
| Getter | Struct | Read by |
|---|---|---|
Get_PropertiesForAnimation | S_CharacterPropertiesForAnimation: input state, movement state and mode, stance, rotation mode, gait, direction, transform, velocity, acceleration, aim rotation, ground, in cover... | Character Anim Blueprints, overlay and first-person Anim Blueprints, cover, the bow |
Get_PropertiesForCamera | S_CharacterPropertiesForCamera: perspective, style, mode (free, strafe, aim), shoulder, stance | Camera director |
Get_PropertiesForTraversal | S_CharacterPropertiesForTraversal: capsule, mesh, motion warping, mode, gait, speed | AC_TraversalLogic |
Get_PropertiesForRagdoll, Get_MMIResult, Get_MMIAnimContexts | Ragdoll and interaction data | Mover Anim Blueprint (ragdoll pawn) |
The Anim Blueprints copy the struct on the game thread (Update_PropertiesFromCharacter) and compute the pose on a worker thread.
Writes go the other way through layer linking: the overlay and equipment systems call LinkAnimClassLayers on the meshes to swap the Anim Blueprints that implement the overlay layers (ALI_OverlayPose, ALI_OverlayBody, ALI_OverlayFirstPerson).
Input to movement¶
Input actions set the pawn's input state (PlayerInputState: wants to sprint, walk, strafe, aim, crouch). Each frame, Mover calls the pawn's ProduceInput, which builds the input command: move direction (after the cover system's remap), cover data from EvaluateCover, control rotation, gait, rotation mode, crouch request. Mover then simulates the movement modes with that command on the owner and the server, and the pawn caches the simulated result for animation and camera (CacheInputsFromMover).
Input actions set CharacterInputState and add movement input. AC_PreCMCTick runs the pawn's pre-movement update before the Character Movement Component each frame: cover (UpdateCoverCMC), rotation and the speed settings for the current gait. The CMC then moves the character and replicates it as usual.
Game framework¶
| Class | Role |
|---|---|
GM_Sandbox | Game mode. Default pawn SandboxCharacter_CMC; Pawn Classes Soft (CMC, Mover) cycled by DDCvar.PawnClass; Visual Overrides Soft (Kellan, Manny, Quinn) cycled by DDCvar.VisualOverride. Respawns all players in place when the pawn class changes. |
GM_Sandbox_Ragdoll | Child of GM_Sandbox with the ragdoll pawn. |
PC_Sandbox | Player controller: next pawn (N), next character (M), teleport (J); hides the touch joystick when a gamepad is used. |
There is no global game mode in the project settings: each level sets it in its World Settings.
Where to extend¶
| You want to | Do this |
|---|---|
| Use GASPALS as your game's base | Start from the template or copy the plugin; see Use GASPALS in your own project. |
| Change a pawn's behavior | Make a child Blueprint of a sample pawn and override functions, or edit the sample. |
| Use the systems on another pawn | Add the systems to your own pawn. |
| Add an item or overlay | Data assets and child Anim Blueprints: Add an equipment item, Add an overlay state. |
| Show another character | Add a retargeted character. |