You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Player survival needs an active repositioning option for evading committed attacks and escaping pressure.
The dash must work consistently across desktop, gamepad, and mobile without taking ownership from the existing movement, facing, defense, attack-cancellation, or virtual-gamepad systems.
This issue delivers the focused player-dash vertical slice; generalized enemy displacement and progression systems are deferred.
Gameplay Contract
Ownership and lifecycle
Add a focused dash component/runtime as the single authoritative owner of dash state and tuning.
A dash request succeeds only when the dash is idle, cooldown is ready, and the player is not guarding, parrying, or in defense recovery.
Snapshot and normalize the dash direction when activation succeeds. The active dash cannot be steered.
Cooldown begins when the dash successfully starts.
Movement input may continue updating during the dash so normal control resumes cleanly afterward.
Do not buffer rejected dash input in the first version.
Dashing does not rotate the player. Existing aim, facing, and defense-facing systems remain authoritative.
Dash itself deals no damage.
Desktop
Bind Dash to Left Ctrl.
With meaningful WASD movement input, dash in the normalized movement direction.
With neutral movement input, dash straight backward relative to the player’s current facing direction.
Gamepad
Bind Dash to left-stick click / L3.
With meaningful left-stick input, dash in the normalized movement direction.
With neutral movement input, use the same straight-back dodge relative to current facing.
Mobile
Do not add a dedicated dash button.
Integrate the request with release of the captured movement stick through the existing virtual-gamepad/Input System path.
Request a dash only when the stick is released while its normalized magnitude is at or above the configurable outer dash threshold; use the release direction.
If the stick moves below that threshold before release, releasing it must not dash.
Reaching the outer threshold earlier in the gesture must not arm a later dash after the stick returns inward. Evaluate the release sample, not historical peak magnitude.
Normalize directional input so diagonal movement does not gain speed or distance.
Classify the snapshotted direction relative to current facing using a broad rear hemisphere rather than exact eight-way sectors.
Dash speed is identical in every direction. Backward dashes must not move more slowly than forward or lateral dashes.
Forward, forward-diagonal, left, and right directions use full dash speed for the full dash duration.
Straight backward, back-left, back-right, and other directions broadly behind the player use the same dash speed for a shorter active duration.
Default rear duration/distance multiplier is 0.60.
Calculate full distance from the authoritative values: dash distance = dash speed × full dash duration.
Calculate rear duration as full dash duration × rear multiplier, then derive rear distance from the same speed: rear dash distance = dash speed × rear dash duration.
With the default 0.60 multiplier, rear duration and distance are 60% of full duration and distance while speed remains unchanged.
Neutral desktop/gamepad activation resolves straight backward and therefore uses the rear duration.
Authoritative Tuning
Keep these values inspector-tunable under the single dash owner:
Invulnerability duration, independently tunable from full or rear dash duration.
Mobile outer release threshold.
Do not independently author normal or rear dash distance. Distance is always derived from dash speed and the selected active duration.
Future upgrade compatibility
Keep dash speed cleanly exposed as one authoritative gameplay value so future progression can increase it without rewriting dash direction or state logic.
Why
Gameplay Contract
Ownership and lifecycle
Desktop
Left Ctrl.Gamepad
Mobile
Direction, Speed, Duration, and Derived Distance
0.60.dash distance = dash speed × full dash duration.full dash duration × rear multiplier, then derive rear distance from the same speed:rear dash distance = dash speed × rear dash duration.0.60multiplier, rear duration and distance are 60% of full duration and distance while speed remains unchanged.Authoritative Tuning
Keep these values inspector-tunable under the single dash owner:
0.60.Do not independently author normal or rear dash distance. Distance is always derived from dash speed and the selected active duration.
Future upgrade compatibility
Combat and State Interaction
Invulnerability
Collision Behavior
Boundary with #276
PlayerCollisionMove2D, collider geometry, barrier/Vault seams, or normal movement collision behavior.Architecture and Scope
PlayerController.PlayerMovementOrchestratoras the normal velocity-input owner.PlayerFacingPolicyResolveras facing-source authority.PlayerFacingOrchestratoras facing execution authority.Acceptance Criteria
Left Ctrlactivates dash on desktop and L3 activates dash on gamepad.0.60.dash speed × full dash duration; no independent distance setting is required.Testing / Validation
Automated
EditMode
0.60rear multiplier.PlayMode
Manual — MainPrototype
Left Ctrlperforms the straight-back dodge.Context