Cite as
NoelFB/Celeste
Original
https://github.com/NoelFB/Celeste
Pinned
NoelFB/Celeste @ 1b0ce45c75e05649ae91b44a8bb6b196684e4352
Accessed
2026-10-20
Licence
MIT (LICENSE: "Copyright (c) 2018 Noel Berry"). The README: "the MIT License only applies to the code in this repo and does not include the actual commercial Celeste game or assets."
Credit
Maddy Thorson and Noel Berry, Celeste's two programmers (Source/Player/Readme.md: "We had 2 programmers working on Celeste (Noel and Maddy)"). Released "as a learning resource and for general interest" (README).
Notes
Contains Source/Player/Player.cs (the full game's player class) and Source/PICO-8/ (the C# port of Celeste Classic that runs inside the full game). Engine classes (Actor, Engine, Calc) are not included.

Cited on

Claims (42)

Celeste Classic's grace counter resets to 6 on the ground and drops by 1 before each airborne jump check, so jumps work for 5 updates after leaving a ledge.Source/PICO-8/Classic.cs L233–243Source/PICO-8/Classic.cs L297–304Code
Inside Celeste, the Celeste Classic port skips every second frame to run at 30 Hz.Source/PICO-8/Emulator.cs L268–273Code
Celeste Classic sets a buffer counter to 4 on a fresh jump press, counts it down by 1 on later updates, and clears it when a normal or wall jump starts.Source/PICO-8/Classic.cs L223–228Source/PICO-8/Classic.cs L297–315Code
A normal jump sets Madeline's vertical speed to the jump speed, −105 px/s.Source/Player/Player.cs L49Code
The jump function sets vertical speed to the jump speed plus any platform lift boost, saves it as the variable-jump speed, starts the variable-jump timer at the variable-jump time, and zeroes the grace timer.Source/Player/Player.cs L1660–1673Code
Celeste's gravity is 900 px/s²; each airborne update moves vertical speed toward the fall limit by the gravity times a multiplier times the update's time step.Source/Player/Player.cs L24Source/Player/Player.cs L2957Code
The half-gravity threshold is 40 px/s, the vertical speed below which (in either direction) holding jump halves gravity.Source/Player/Player.cs L25Code
Gravity halves while the absolute vertical speed is under the half-gravity threshold and jump is held (or auto-jump is on), so a held jump hangs at the top.Source/Player/Player.cs L2952Code
The variable-jump time, how long holding jump can keep the take-off speed, is 0.2 s.Source/Player/Player.cs L51Code
While the variable-jump timer runs, holding jump keeps Madeline rising no slower than the speed saved at take-off, canceling gravity; releasing zeroes the timer and cuts no speed.Source/Player/Player.cs L2960–2966Code
The normal limit on falling speed is 160 px/s; entering the normal state starts the current limit there and gravity approaches it.Source/Player/Player.cs L23Source/Player/Player.cs L2760–2763Code
Holding down while falling at the normal limit or faster raises the limit toward a fast limit (240 px/s) at 300 px/s²; otherwise it eases back.Source/Player/Player.cs L27–28Source/Player/Player.cs L2911–2924Code
The jump grace time, Celeste's coyote time, is 0.1 s.Source/Player/Player.cs L48Code
Grounded updates refill the jump grace timer; airborne ones subtract the update's time step before the normal state's update, which jumps on a press while it is above zero.Source/Player/Player.cs L713–720Source/Player/Player.cs L2970–2975Code
In each update, the player's update ticks both jump timers, the state machine runs the normal state's update (gravity, hold, and new jump), and then the vertical move applies the vertical speed times the time step.Source/Player/Player.cs L742–744Source/Player/Player.cs L908Source/Player/Player.cs L934–935Source/Player/Player.cs L322–323Code
Celeste's actors sit on whole pixels; the vertical move adds the float distance to a remainder, moves by its rounded value, and keeps the fraction.Source/Player/Player.cs L935Dev blog
Celeste's developers describe the game as locked to 60 updates per second, so the bundled PICO-8 port skips every second frame.Source/PICO-8/Emulator.cs L268–270Developer
At normal speed, Celeste's time step per update is most likely (float)0.0166667 s, the XNA and FNA default 166,667-tick step, not an exact 1/60 s.Source/Player/Readme.md L28Wiki
The 0.1 s grace and 0.2 s variable-jump timers end on float rounding: a 0.0166667 s step gives 5 and 11 updates, and an exact 1/60 s step gives 6 and 12.Source/Player/Player.cs L713–720Source/Player/Player.cs L742–744Source/Player/Player.cs L1664Code
Simulating the jump code (flat ground, no lift boost, a 0.0166667 s step) gives apexes of 7 px tapped and 27 px held, airtimes 15 and 39 updates; an exact 1/60 s step gives 29 px held in 40.Source/Player/Player.cs L2952–2966Source/Player/Player.cs L1660–1673Code
The developers chose one large file of long methods for the player's behavior, so its tightly ordered logic reads in sequence.Source/Player/Readme.md L16Developer
Madeline's top running speed is 90 px/s, and the same limit applies in the air.Source/Player/Player.cs L30Source/Player/Player.cs L2888Code
Each update moves Madeline's horizontal speed toward 90 px/s times the d-pad direction by the run acceleration, 1000 px/s² on the ground, so the same rate speeds her up, turns her, and stops her.Source/Player/Player.cs L31Source/Player/Player.cs L2884Source/Player/Player.cs L2893–2894Code
Above 90 px/s with the d-pad held the same way, Madeline slows toward 90 px/s at a reduction rate of 400 px/s², instead of the full 1000.Source/Player/Player.cs L32Source/Player/Player.cs L2891–2892Code
In the air both running rates are multiplied by an air multiplier, 0.65, so steering, stopping, and turning take 650 px/s², and slowing from above the cap 260 px/s².Source/Player/Player.cs L33Source/Player/Player.cs L2884Code
Holding Down on the ground ducks Madeline; while ducked, her speed moves toward 0 at a duck friction of 500 px/s², whatever the d-pad holds.Source/Player/Player.cs L40Source/Player/Player.cs L2831–2837Source/Player/Player.cs L2858–2860Source/Player/Player.cs L2880–2881Code
Jumping while ducked keeps Madeline's 8 × 6 px ducking hitbox until she is falling with room to stand, because the jump function leaves her ducking flag alone and only the falling check, which tests whether she has room to stand, clears it in the air.Source/Player/Player.cs L1660–1673Source/Player/Player.cs L927–929Code
The jump function adds a horizontal boost, 40 px/s, times the d-pad direction to Madeline's horizontal speed, after that update's running step, so a running jump leaves at 130 px/s.Source/Player/Player.cs L50Source/Player/Player.cs L1670Source/Player/Player.cs L2969–2975Code
On a landing in her normal state while not dash-attacking, the code zeroes Madeline's vertical speed and keeps her horizontal speed, unless her latest dash went down and to the side: then the landing multiplies her horizontal speed by 1.2 and makes her duck, once per dash. While dash-attacking, a landing on a dream block can send her into the dream dash first, before either speed changes. The landing update has already used the air rates, and the ground rates start on the next.Source/Player/Player.cs L2631–2632Source/Player/Player.cs L636–644Source/Player/Player.cs L931–935Source/Player/Player.cs L2453–2552Source/Player/Player.cs L44Source/Player/Player.cs L2642–2646Source/Player/Player.cs L3564Code
Each update starts by looking for ground; while her vertical speed is 0 or more, Madeline is on the ground if her hitbox, moved 1 px down, overlaps a solid or a jump-through platform.Source/Player/Player.cs L636–651Code
When Madeline hits a solid sideways in the normal state, the horizontal collision handler zeroes her horizontal speed, unless, while she's dash-attacking, a dash block rebounds, bounces, or ignores her, or a dream block takes her in.Source/Player/Player.cs L2440–2442Source/Player/Player.cs L2378–2395Source/Player/Player.cs L2424–2428Source/Player/Player.cs L2644Code
While Madeline is in control and isn't climbing, picking something up, red-dashing, or in the squash after a red dash hits a solid, she faces whichever way the d-pad points, on the ground or in the air, updated at the start of each update before her speed changes.Source/Player/Player.cs L786–794Source/Player/Player.cs L2442–2449Code
Simulating the code, Madeline reaches 90 px/s from a standstill in 6 updates on the ground and 9 in the air, and needs 11 and 17 to turn from 90 to −90 px/s.Source/Player/Player.cs L2879–2895Code
Simulating the code, a running jump leaves at 130 px/s and slows back to 90 px/s in 10 airborne updates with the d-pad held; a jump from a standstill with the d-pad held leaves at 56.67 px/s.Source/Player/Player.cs L1670Source/Player/Player.cs L2891–2892Code
Simulating a hop steered back with Left, the landing update still changes Madeline's speed at the air rate, −10.83 px/s, and the next at the ground rate, −16.67 px/s.Source/Player/Player.cs L636–644Source/Player/Player.cs L2884–2894Code
A frame-by-frame model of the player's update and its normal state on flat ground matches a statement-by-statement float32 simulation of the released code on every frame of 300 random input scripts, for both delta-time steps.Source/Player/Player.cs L601–935Source/Player/Player.cs L2784–3008Source/Player/Player.cs L1660–1673Code
Madeline's hitbox is 8 px wide and 11 px tall, centered on her X with her position at its bottom; ducking shrinks it to 8 × 6 px.Source/Player/Player.cs L263–266Source/Player/Player.cs L2113–2131Code
When Madeline rises into a solid in the normal state, she is moved 1 px up and 1 to 4 px sideways to the first spot where her hitbox fits, keeping her speed. She tries leftward first unless she is moving right, then rightward unless she is moving left.Source/Player/Player.cs L53Source/Player/Player.cs L2585–2611Source/Player/Player.cs L931–935Code
When Madeline rises into a solid in the normal state and no corner correction fits, her vertical speed is zeroed. The variable-jump timer is zeroed too, unless it still reads at least the variable-jump time less a ceiling grace, 0.2 − 0.05 s, which spares hits in the jump's first 0.05 s.Source/Player/Player.cs L52Source/Player/Player.cs L2614–2615Source/Player/Player.cs L2631–2632Code
A ceiling hit spares the variable-jump timer on the jump's own update and the 2 after it with a 0.0166667 s step, and the 3 after it with an exact 1/60 s step. Three subtractions of the 1/60 s step leave the timer at exactly the float 0.15, which is not below the limit.Source/Player/Player.cs L742–744Source/Player/Player.cs L2614–2615Code
Madeline stands up from a duck only where her standing 8 × 11 px hitbox fits. Under a solid that's too low, releasing Down on the ground in the normal state, or starting to fall, leaves her ducked. On the ground in the normal state, if she is stopped, she slides at 50 px/s toward room within 4 px.Source/Player/Player.cs L2136–2147Source/Player/Player.cs L2831–2851Source/Player/Player.cs L41–42Source/Player/Player.cs L927–929Code
On stages with floating blocks, a frame-by-frame model of Madeline rising into solids, her ducking box, and the check for room to stand matches a statement-by-statement float32 simulation of the released code on every frame of random stages and input scripts.Source/Player/Player.cs L2453–2640Source/Player/Player.cs L2359–2451Source/Player/Player.cs L2136–2149Source/Player/Player.cs L2831–2862Source/Player/Player.cs L927–935Code