I’m trying to figure out how to make Gameplay Attributes and Gameplay Abilities work with Mover and its resimulation/replication. The examples aren’t clear.
Our game has a character dash - basic effect is push a button, character receives a boost (constant linear velocity applied over time for a specific duration.) Current implementation is using FLayeredMove_LinearVelocity and works fine.
Details: The dash input button fires a dash gameplay ability, that gameplay ability checks to make sure the player has enough stamina (a gameplay attribute) then sets properties in our custom mover component. Then ProduceInput consumes those properties and sets other properties in a custom struct that hangs off the input collection (FMyAdditionalInputs that works like the FCharacterDefaultInputs of the examples.) OnMoverPreSimulationTick then processes that struct and actually creates the layered move. For this to work well, the gameplay ability can be local only, and all NPP related rollback is isolated entirely to the mover simulation.
My first question is: can abilities cause a rollback? In the above example, say player A has enough stamina locally and presses dash, but then gets notification of another ability from player B that burns their stamina below the required level. Will NPP rollback my gameplay sim to play that ability, and if so will it replay my execution of dash and have it fail? If _that_ happens, will it know it needs to rewind the created layered move as well?
My second question is about the mover sim existing on both client and server. Imagine player B has an ability (call it pull) that does a linear velocity layer move on player A? There’s three different places simulating both ability and movement in this case, and I want to understand how they interact.
One potential guess is that a LocalPredicted version of pull would generate layered moves for player A on player B’s client, but that when the server also activates the ability it can make authoritative versions of the layered moves for player A - how are those resolved on player B’s client? It doesn’t seem like there is sufficient information for player B’s client to know that the interpolated information it receives from the server it has already generated locally because nothing associates the moves with the abilities, so is a correction just inevitable then? What about the case where the movement and the gameplay activations are interleaved? Will NPP rolling back in time for one force rollback/resim for both?
I understand that “more work needs to be done to show how Mover and GAS should work together” and that’s coming post-5.7 from reading other questions, but what I’m mostly looking for is some kind of high level guidance about how much information I need to supply to the movement for resimulation. At a high level:
- Is Mover just interpolating values and first derivates its receiving from a server tick, or is it replaying pieces of the movement stream?
- What’s the difference between “Forward Predict” and “Interpolated” for Simulated Proxies?
- What are the ramifications of turning my simulation tick way, way down? It seemed at first blush that Mover might be forwarding around the actual input events and then doing resim/rollback on mispredict but from other people’s questions here that might not be the case?
- Are these actually all the same question?
