Player Moves - EverestAPI/CelesteTAS-EverestInterop GitHub Wiki

Authors: Molly, bro0183

This page aims to cover methods of the Player class that are used to move Madeline in a wide range of circumstances. For other Player members, see Player States for the StateMachine, Timer Abuse for various timer fields/properties, and Holdable Movement for the holdable-related methods.

Note

The spring-related methods and most other fields/properties are not yet covered on this wiki. Help for significant topics would be greatly appreciated if you have the knowledge!

Player Input

The moves in this section can all be triggered by player input in various circumstances.

Jump

Pressing jump in each of the circumstances below sets varJumpTimer and varJumpSpeed to specific values. While varJumpTimer is positive, holding jump will set Madeline's vertical speed to varJumpSpeed each frame.

Ground Jump

While Madeline is touching the ground or in coyote time, pressing jump will start a ground jump, setting varJumpTimer to 0.2 (12f at 100% speed). In addition, if Madeline is not in StDash, her horizontal speed will be maintained and varJumpSpeed will be set to -105 + LiftBoost.Y. If the player's directional input has a horizontal component, this will add 40 in that direction to Madeline's horizontal speed.

Super and Hyper

A ground jump can only be started while in StDash if, in addition to the above requirements, Madeline's DashDir is strictly horizontal. Instead of having the effects described above, starting a ground jump from StDash causes the following:

  • If Madeline is not crouching, her horizontal speed will be set to 260 + LiftBoost.X and varJumpSpeed will be set to -105 + LiftBoost.Y. This is known as a "super".
  • If Madeline is crouching, her horizontal speed will be set to (260 + LiftBoost.X) * 1.25 and varJumpSpeed will be set to (-105 + LiftBoost.Y) * 0.5. This is known as a "hyper".

Walljump

While , Pressing jump will start a walljump, setting varJumpTimer to 0.2 (12f at 100% speed) and varJumpSpeed to -105 + LiftBoost.Y, if either of the following is true:

  • Madeline is in StClimb and holding away from the wall.
  • There are less than 3 pixels between Madeline and a wall, the player isn't holding grab, or Madeline has no stamina or is unable to grab.

This will also set Madeline's horizontal speed to 130 + LiftBoost.X away from the wall.

Neutral

If the player's directional input has any horizontal component, starting a walljump will also set forceMoveX away from the wall for 0.16 (10f at 100% speed). A walljump that does not set forceMoveX is known as a "neutral".

Climbjump

Pressing jump will start a climbjump, setting varJumpTimer to 0.2 (12f at 100% speed) and varJumpSpeed to -105 + LiftBoost.Y, if either of the following is true:

  • Madeline is in StClimb and holding neutral or towards the wall. She does not need stamina to climbjump from StClimb.
  • There are less than 3 pixels between Madeline and a wall, the player is holding grab, and Madeline has stamina but is unable to grab.

There are numerous climbjump-related mechanics explained in detail on the Climbjumps + Variations page.

Wallbounce

Pressing jump will start a wallbounce, setting varJumpTimer to 0.25 (15f at 100% speed) and varJumpSpeed to -160 + LiftBoost.Y, if all of the following is true:

  • Madeline is DashAttacking and DashDir is upwards (specifically, DashDir.X is within 0.2 of neutral, and DashDir.Y is -0.75 or farther up).
  • There are less than 5 pixels between Madeline and a wall, there are at least 5 pixels between Madeline and spikes, and DashDir is exactly (0, -1).
  • There are less than 3 pixels between Madeline and a wall if the above is not true.

Starting a wallbounce will also set Madeline's horizontal speed to 170 + LiftBoost.X.

Dash

When Madeline has a dash available and the player presses the Dash bind (or the Crouch Dash bind while Crouch Dash Mode is Press), Madeline will start a dash. If uninterrupted, this will cause the following sequence of events:

  1. Immediately on the frame the bind was pressed, Madeline's state will be set to StDash. DashBegin will set her speed to 0, uncrouch her if she was crouching and airborne and there's room, crouch her if she wasn't just uncrouched and either down or the Crouch Dash bind were held, and finally cause 3 freeze frames.
  2. The frame after the freeze frames, DashCoroutine's first step will:
  • calculate Madeline's speed as follows:
    1. initially set Madeline's speed to 240 in the direction of the player's directional input, snapped to orthogonal normally or exact angle with the 360 Dashing variant enabled.
    2. if Madeline's horizontal speed before the dash was higher than the new horizontal speed, restore the previous horizontal speed.
    3. if Madeline's hitbox is touching water, multiply the speed on both axes by 0.75.
    4. if Madeline is touching ground that isn't an active dream block and the input direction was down-diagonal, set the dash direction to horizontal and multiply horizontal speed by 1.2 (this is a form of grounded ultra).
    5. if Madeline is standing on a swap block and it moves the same direction she dashed, set speed on that axis to 0.
  • if the dash was not started in a booster, call the OnDash method of any Components of type DashListener that are registered in the current Scene's Tracker -- in vanilla, this activates swap blocks and winged berries.
  1. The next frame, DashCoroutine's next step will wait for an additional duration 0.15 (9f at 100% speed) normally or 0.3 (18f at 100% speed) with the Super Dashing variant enabled. When this duration elapses, the coroutine's final step will:
  • calculate Madeline's speed as follows:
    1. if the dash direction has a downwards component, do not modify speed. Otherwise, set speed to 160 in the dash's direction.
    2. if the dash direction has an upwards component, multiply vertical speed by 0.75.
  • set Madeline's state to StNormal.

Grab

If there is no more than one pixel between Madeline and the wall she's facing, Madeline is able to grab, and there is not a holdable in range, holding grab will cause Madeline to grab the wall. This will set Madeline's state to StClimb, which will set her climbNoMoveTimer to 0.1 (6f at 100% speed), set horizontal speed to 0, and multiply vertical speed by 0.2.

Once climbNoMoveTimer reaches 0:

  • Holding neutral vertical will cause Madeline to decelerate towards 0 speed (or 30 downwards speed if she's in climbhop range) at 15 per frame and consume 10 * DeltaTime stamina per frame (~0.166667 at 100% speed). If she has downwards speed and is on the bottom pixel of the wall, her speed will be set to 0 instead.
  • Holding up will cause Madeline to climb up, increasing speed by -15 until a maximum of -45, and consume ~45.45 * DeltaTime stamina per frame (~0.7575 at 100% speed). If she's at the top of the wall and certain conditions are met, she'll start a climbhop.
  • Holding down will cause Madeline to slide down, increasing speed by 15 until a maximum of 80 and not consume stamina.

Interactions

The moves in this section are more accurately described as interactions between Madeline and certain entities or mechanics. They're documented here since they're still so generic that they ended up in the Player class rather than that of another entity or mechanic.

Bounce

This method starts a jump that sets varJumpSpeed to -140, varJumpTimer to 0.2 (12f at 100% speed), and AutoJump to 0.1 (6f at 100% speed). It also refills Madeline's dashes and stamina, sets her state to StNormal, and forces her to forget her CurrentBooster.

In vanilla, Player.Bounce is called when Madeline bounces on Oshiro, snowballs, seekers, iceballs, pufferfish, and in assist mode on deadly pits.

PointBounce

This method sets Madeline's speed away from a certain point, calculated as follows:

  • Normalize the difference between Madeline's position and the given point.
  • If the result's vertical component is between -0.2 and 0.4, set that component to -0.2.
  • Multiply the horizontal component by 1.5.
  • Multiply the result by 220, then set the horizontal component to a minimum of 100 away from the point.

It also refills Madeline's dashes and stamina, sets her state to StNormal if she was in StDash, and forces her to forget her CurrentBooster if she was in StBoost.

In vanilla, Player.PointBounce is called Madeline collides with hearts and shielded feathers while not DashAttacking, and with stunned seekers under any circumstances.

⚠️ **GitHub.com Fallback** ⚠️