top of page

Player Movements

In Pre-production phase we only planed to have Dash and slide for the player to traverse through and dodge the enemy projectils. During the development cycle, I iterated the movement mechanic by base on each playtest feedback. 

DashSlowDown.png

Dash Logic Tree

Dash

I used Corourtine that excute the dash, the dash coroutine mainly contain 2 phase: forward period and slowdown period

​

During the Dash Forward phase, I use raycast pointing player forward to detect if player hit obstcale or not, if does, stop the dash.

During the Decelerate P​hase, lerp to the vector3 that has Dash direction and pre-dash Velocity Magnitude​ which allow dash to change the direction but keep the pre-dash momentum.​​

Dash Decelerate Period

Dash Forward Period

Slide And Crouch

Slide/CrouchLogicTree.png

Slide Logic Tree

In GlichHop,  the slide and crouch are the same keybind, and will perform either one of them based on the current player speed.

 

The slide is momentum based which means it will preserve the velocity before the slide, and also, player can steer the movement direction during the slide. So the slide coroutine iscomposed by 2 while loop, acceleration loop and the loop that checking compare the current velocity to the stop velocity

​

The crouch mechanical wise, is relatively simple. It will shrink the player height on activate and reset it to default when deactivated.

image.png
Slide Steer Code.png

Slide Steering Code

For the slide steering, I calculate the perpendicular amount (clamped between 0 and 1) of the player's movement input relative to the current slide velocity direction. This value determines how "hard" the turn is . In addition, the player can apply extra braking by giving the input opposite to the slide direction, allowing the slide to slow down or stop more quickly.

DoubleJump And CoyoteJump

Jump Logic Tree.png

Jump Logic Tree

The Double Jump and Coyote jump are the mechanic I added through iteration.

After multiple play test, we noticed that player tend to miss the platform a lot which increase the furstration and interrupt the game flow. So the team decided to add the double jump and coyote jump that providing players more flexibility and room for error .

Jump Perform

JumpPerform Code.png
bottom of page