Walls
The stage walls (the HalfWidth of the stage) are more than limits. By default AFT plays them like Street
Fighter 6:
- a wall bounce sends a juggled fighter back from the wall, for a longer combo;
- a wall splat sticks it to the wall for a moment, then it falls into a knockdown.
Each hit says which wall reaction it carries, and the Wall Rules of the battle rules play it. The Wall Rules are a pluggable class: the template ships a Guilty Gear style wall break example, and you can write your own wall system in Blueprint or C++. Everything runs inside the deterministic simulation, so walls are rollback safe online.
Set the wall reaction of a hit
In the hit definition of an action (Fighter Editor > Hits):
| Field | Values |
|---|---|
WallReaction | Auto (default): Bounce when the hit's reaction is WallBounce, else None. None: no wall reaction, the fighter slides down the wall. Bounce: wall bounce. Splat: wall splat. |
CounterHit > WallReaction | Override on counter hit (Auto = same as a normal hit). For example a punish counter that wall splats. |
The hit gives the defender a pending wall reaction:
- the Wall Rules play it if the defender reaches a wall before landing;
- each hit sets it, so a later hit replaces it;
- it is cleared on landing or knockdown, and when the combo ends;
- wall bounces are counted per combo.
The WallBounce reaction (GroundReaction or AirReaction) launches the defender toward the wall like Launch
(AirLaunchVelocity), with the Hit Launch animation. The Wall Bounce reaction plays when it reaches the wall. A hit with
the WallBounce reaction and WallReaction on Auto is all you need for a wall bounce move.
Animations and effects
| Asset | Use |
|---|---|
AFT.Action.Hit.WallBounce slot | Bouncing off the wall. |
AFT.Action.Hit.WallSplat slot | Stuck to the wall. Falls back to Hit.WallBounce, then Hit.Air. |
AFT.Cue.Wall.Bounce cue | A fighter bounces off the wall (impact, dust, camera shake). |
AFT.Cue.Wall.Splat cue | A fighter sticks to the wall. |
AFT.Cue.Wall.Break cue | The wall breaks (wall break rules). |
Add the cues to your cue set. The simulation also emits the Wall Bounce, Wall
Splat and Wall Break events: the battle presentation plays their cue, and UAFTBattleSubsystem::OnSimEvent broadcasts
them to Blueprint, for example to play a stage transition on a wall break.
Default rules (Street Fighter 6)
Battle Rules > Wall > Wall Rules holds an instanced object: pick its class, then edit its settings in place. The default is
AFT Wall Rules (SF6 Bounce) (UAFTWallRules). Existing battle rules assets get it automatically.
Wall bounce
A juggled fighter with a pending Bounce that hits a wall bounces back toward the attacker, once per combo:
| Setting | Default | Description |
|---|---|---|
MaxBouncesPerCombo | 1 | Wall bounces allowed in one combo (Street Fighter 6: one). 0 disables the bounce. |
MinImpactSpeed | 2 | Slower impacts don't bounce (cm per frame). |
BounceSpeedPercent | 45 | Speed back from the wall, percent of the impact speed. |
MinBounceSpeed | 3 | Speed back from the wall at least (cm per frame). |
BounceUpSpeed | 10 | Upward speed after the bounce at least (cm per frame): the juggle window. |
BounceHitStop | 8 | Hit stop of the impact. |
BounceHitStun | 60 | Hit stun after the bounce at least: the fighter can't recover before landing. |
Wall splat
A fighter with a pending Splat that hits a wall sticks to it, back to the wall, then falls into a knockdown: a combo opportunity. A Splat hit on a grounded defender close to the wall slams it into the wall at once (the Drive Impact in the corner of Street Fighter 6).
| Setting | Default | Description |
|---|---|---|
SplatFrames | 30 | Frames stuck on the wall. |
SplatHitStop | 10 | Hit stop of the impact. |
SplatMinHeight | 80 | Height on the wall at least (cm): a grounded fighter is slammed up the wall and slides down. |
SplatWallDistance | 80 | A Splat hit on a grounded defender this close to the wall (cm) splats it at once. |
BounceCue, SplatCue | None | Cues of the bounce and the splat (None: AFT.Cue.Wall.Bounce / AFT.Cue.Wall.Splat). |
Without a pending reaction (or after the last allowed bounce), the wall stops the horizontal motion and the fighter slides down the wall.
Guilty Gear wall break
AFT Wall Rules (Guilty Gear Wall Break) (UAFTWallRules_WallBreak) is a complete C++ example built on the default rules:
wall bounces and splats keep working.
- Every hit on a defender within
WallDistanceof the wall damages the wall:WallDamagePerHitplusWallDamagePercentof the hit damage. - When the wall damage reaches
WallHealth, the wall gives: the defender sticks to it forStickFrames. - The next hit on the stuck defender breaks the wall:
- a Wall Break event and cue;
- the fight freezes for
BreakFreezeFrames(the stage transition); - both fighters start again around the stage center,
BreakDistanceapart, with the defender knocked down, on the side of the broken wall; - the camera is centered and the projectiles are removed;
- the attacker gets
AttackerMeterBonusmeter (the positive bonus of Guilty Gear).
- The wall heals when the combo ends.
| Setting | Default | Description |
|---|---|---|
WallHealth | 3000 | Wall damage before it gives. |
WallDistance | 150 | Hits on a defender this close to the wall (cm) damage it. |
WallDamagePerHit | 150 | Wall damage of every hit on a defender close to the wall... |
WallDamagePercent | 50 | ...plus this percent of the hit damage. |
StickFrames | 45 | Frames the defender stays stuck to the giving wall: the window for the breaking hit. |
BreakFreezeFrames | 60 | Fight freeze during the break. |
BreakDistance | 300 | Distance between the fighters after the break (cm). |
AttackerMeterBonus | 2500 | Meter given to the attacker. |
BreakCue | None | Cue of the break (None: AFT.Cue.Wall.Break). |
It keeps its state in the wall memory: fighter memory 0 is the wall damage, fighter memory 1 says the wall is giving, and match memory 0 counts the broken walls (for example to pick the next stage section).
Custom wall rules
The simulation calls the Wall Rules on three events:
| Event | When |
|---|---|
| Wall Contact | A fighter in hit stun moves into a wall, once per impact (after the stage limits are applied). |
| Hit | A hit landed, at any distance (Is Cornered tells whether the defender is close to the wall it is pushed toward). |
| Combo End | The combo received by a fighter is over: back to neutral, or wake up. |
Blueprint
- Create a Blueprint class whose parent is AFT Wall Rules (SF6 Bounce) or AFT Wall Rules (Guilty Gear Wall Break).
- Add the settings of your rules as variables and tick Instance Editable: they are edited in the battle rules, with the settings of the parent class.
- Override On Wall Contact, On Hit and / or On Combo End (My Blueprint > Functions > Override). Each receives a
context (
UAFTWallBlueprintContext), valid during the event only. - Pick the class in Battle Rules > Wall > Wall Rules and set its variables.
Call Run Default in an event to play the parent class behavior and add to it, instead of replacing it.
The template has an example, /AFT/Data/WallRules/BP_AFT_WallRules_CornerMeter: its On Hit calls Run Default (the SF6
bounce and splat), then, when Is Cornered, gives the attacker Meter Bonus (500 by default) with Add Meter.
| Context function | Description |
|---|---|
Get Event, Get Fighter, Get Attacker, Get Fighter Data | The event, the fighter at the wall / hit / whose combo ended, its last attacker (-1 when none), the fighter data of a fighter. |
Get Wall Side, Get Impact Speed, Get Distance To Wall | Wall side (-1 left, 1 right), contact speed toward the wall (AFT Fixed, cm per frame), distance between a fighter and a wall (AFT Fixed, cm). |
Get Hit, Get Hit Damage, Is Counter Hit, Is Cornered, Was Stuck | Hit events: the hit definition, its damage, counter hit, defender close to the wall, defender stuck on the wall before this hit. |
Get Pending Reaction, Get Wall Bounces, Get Combo Count, Is KO | State of the fighter. |
Random Range, Random Chance | Deterministic random numbers (the simulation random). |
Get / Set Fighter Memory, Get / Set Match Memory | 4 integers per fighter and 4 for the match, saved and restored with the simulation. |
Bounce, Stick | Wall bounce (minimum speeds in cm per frame: SF6 uses 3 back and 10 up), wall splat / stick (minimum height in cm: SF6 uses 80; works on Hit events too, for a Guilty Gear wall stick). |
Set Velocity, Set Pending Reaction, Add Hit Stun, Freeze, Add Meter | Change the fight (velocity in cm per frame, X away from the wall). |
Emit Event | A presentation event with a cue tag (played by the battle presentation, broadcast to Blueprint). |
Reset Positions | Stage transition: both fighters around the center, at a distance (cm), the fighter optionally knocked down. |
Run Default | The parent class behavior for this event. |
Distances and speeds are AFT Fixed values in cm (cm per frame for speeds): build them with the deterministic AFT Fixed
nodes (Fixed From Int, + - * /, < >...), never from Float math, which can differ between two machines. The
Instance Editable variables of your class are added to the content hash: online peers with different values refuse to play.
The events are const functions: they can't change the variables, keep state in the memory below.
C++
Derive from UAFTWallRules (or UAFTWallRules_WallBreak):
- override
NativeWallContact,NativeHitand / orNativeComboEnd. Blueprint subclasses of your class keep working and reach them with Run Default; - or override
OnWallContact,OnHitandOnComboEndfor full control (they call the Blueprint event, else the native version); - override
HashSettingsto add your settings to the content hash: online peers with different wall rules refuse to play.
FAFTWallContext gives the same reads and orders as the Blueprint context. Distances and speeds are fixed point: 1000 = 1
cm (per frame for speeds). UAFTWallRules_WallBreak in AFTWallRules.cpp is a short example to start from.
Determinism rules
The Wall Rules run inside the rollback simulation, like the CPU brains:
- the rules object is shared, read-only data: never store state in it;
- keep what must be remembered in the fighter and match memory, saved and restored with the simulation;
- draw random numbers with the context's Random only;
- never read actors, time or anything outside the context.
See Writing Deterministic Code.
Current limits
- The
GroundBouncereaction only plays its animation: there is no ground bounce physics yet. - No move of Quinn uses a wall bounce or a wall splat yet.
- The CPU does not plan its combos around wall bounces.