v0.1 ⌊ALPHA⌉
On this page
  1. Jumping
  2. Related
  3. References
  4. Sources

Maddy Thorson and Noel Berry released Celeste’s player class under the MIT license, “as a learning resource and for general interest”. The release includes the built-in C# port of Celeste Classic. The license excludes the game and its assets.

All of Madeline’s movement sits in one file, Player.cs, which the developers call a conscious choice to keep its order of operations readable1. The release omits the engine classes it calls (Actor, Engine, and Calc). Some details below rest instead on the public Monocle source and Thorson’s physics write-up.

#Jumping

A jump sets the vertical speed to -105 px/s2,3. For variable jump height, holding jump keeps that speed for up to 0.2 s4,5, then halves gravity near the apex6.

Gravity is 900 px/s²7, with a normal fall limit of 160 px/s8. Units are pixels per second, multiplied by Engine.DeltaTime each update9. Positions are whole pixels, with the fraction kept in a subpixel remainder10.

Coyote time, the grace window after leaving a ledge, is 0.1 s11,12.

References

  1. ^The developers chose one large file of long methods for the player's behavior, so its tightly ordered logic reads in sequence. T2NoelFB/Celeste · Source/Player/Readme.md L16
  2. ^A normal jump sets Madeline's vertical speed to JumpSpeed, −105 px/s. T3NoelFB/Celeste · Source/Player/Player.cs L49
  3. ^Jump() sets vertical speed to JumpSpeed plus any platform lift boost, saves it as varJumpSpeed, starts varJumpTimer at VarJumpTime, and zeroes the grace timer. T3NoelFB/Celeste · Source/Player/Player.cs L1660–1673
  4. ^VarJumpTime, how long holding jump can keep the take-off speed, is 0.2 s. T3NoelFB/Celeste · Source/Player/Player.cs L51
  5. ^While varJumpTimer runs, holding jump keeps Madeline rising no slower than varJumpSpeed, canceling gravity; releasing zeroes the timer and cuts no speed. T3NoelFB/Celeste · Source/Player/Player.cs L2960–2966
  6. ^Gravity halves while |Speed.Y| is under HalfGravThreshold and jump is held (or auto-jump is on), so a held jump hangs at the top. T3NoelFB/Celeste · Source/Player/Player.cs L2952
  7. ^Celeste's gravity is 900 px/s²; each airborne update moves vertical speed toward the fall limit by Gravity * mult * Engine.DeltaTime. T3NoelFB/Celeste · Source/Player/Player.cs L24, L2957
  8. ^MaxFall, the normal limit on falling speed, is 160 px/s; NormalBegin starts maxFall there and gravity approaches it. T3NoelFB/Celeste · Source/Player/Player.cs L23, L2760–2763
  9. ^In each update, Player.Update ticks both jump timers, the state machine runs NormalUpdate (gravity, hold, and new jump), and then MoveV applies Speed.Y * Engine.DeltaTime. T3NoelFB/Celeste · Source/Player/Player.cs L742–744, L908, L934–935, L322–323JamesMcMahon/monocle-engine · Monocle/Entity.cs L95–98
  10. ^Celeste's actors sit on whole pixels; MoveV adds the float distance to a remainder, moves by its rounded value, and keeps the fraction. T2Thorson 2020 · Actor BasicsNoelFB/Celeste · Source/Player/Player.cs L935
  11. ^JumpGraceTime, Celeste's coyote time, is 0.1 s. T3NoelFB/Celeste · Source/Player/Player.cs L48
  12. ^Grounded updates refill jumpGraceTimer; airborne ones subtract Engine.DeltaTime before NormalUpdate, which jumps on a press while it is above zero. T3NoelFB/Celeste · Source/Player/Player.cs L713–720, L2970–2975

Sources

Code

Primary