Maddy Thorson and Noel Berry's PICO-8 platformer, frame for frame.
No Lua interpreter: the cart's Lua ported by hand and proven against the original, every frame, in every room.
Download the game »
How to play
·
From PICO-8 to CHGame
·
Building it
·
Report a bug
Table of contents
Climb Celeste Mountain, 100 m at a time. Run, jump, wall-jump and dash through 30 single-screen rooms of spikes, crumbling floors, springs, balloons and hidden strawberries, then plant your flag on the summit.
Celeste Classic was made in four days for PICO-8 in 2015, and grew into Celeste. The CHGame has the same 128x128, 16-colour screen as PICO-8, so the sprites, map and sound come straight out of the original cart. The Lua was rewritten in C++ for a 48 MHz RISC-V with 20 KB of RAM and no FPU.
| Button | Action |
|---|---|
| D-pad | Run; with B, the dash's direction (eight ways); DOWN crouches, UP looks up |
| A | Jump; next to a wall, wall-jump |
| B | Dash: one in the air, two after the orb. A dash breaks cracked walls |
| START | Pause: continue, restart the room, or back to the title |
The rules and what is in the mountain are in the game's own README.
- The original game, frame for frame. Physics, rooms, timings and quirks are the cart's, down to PICO-8's 16.16 number rounding.
- The original art and map, extracted from the cart at build time: all 31 rooms, the title, the summit.
- Its music and sound effects on the piezo. 21 effects and the area songs, converted from the cart's
__sfx__and__music__. - 30 fps on the board, with about half of each frame to spare.
- Pause and continue, which the cart never had. START pauses the climb; each new level is saved, and the title offers to continue from it.
- A complete scripted playthrough, boot to summit in 1:53 with no deaths, that runs in CHGame's simulator as a test.
The CHGame library and CHGfx; Python for the cart extractors; Lua 5.4 (via lupa) to run the original cart on the PC for the comparisons; and CHGame's simulator.
- Download the latest release from the Releases page.
- Pick one:
- The cart,
CHeleste-<version>.chgame, for CHGame's SD menu and tools. - The firmware,
CHeleste-<version>.bin, to upload over USB without building it.
- The cart,
- Pick Celeste Classic from the menu and press A.
To build it yourself, or to regenerate its data from your own copy of the cart, see BUILDING.md.
assets/celeste.p8 ──► tools/p8extract.py ──► src/assets/Cart.* sprites, map, flags, palette
└─► tools/p8audio.py ──► src/audio/Audio.* effects, Playtune songs
cart's __lua__ ──► (by hand) ──► Cheleste/Game.cpp the game, function by function
- Game.cpp is the cart's Lua, in its order and with its names. It knows nothing of CHGame: it draws through P8.cpp, which reimplements PICO-8's drawing calls on the framebuffer.
- Fix.h gives the game PICO-8's numbers: 16.16 fixed point, with wrapping, flooring and PICO-8's
%. No floating point reaches the chip. - The sprite sheet is stored the way the framebuffer packs pixels, so a sprite row is four bytes copied with a transparency test.
| At a glance | |
|---|---|
| Frame rate | the cart's 30 fps; rendering is estimated at 13-19 ms of the 33 ms frame |
| Flash | 45,448 of 50,432 B (both save pages kept) |
| RAM | 17,360 of 18,416 B, plus a 2 KB stack |
| Data from the cart | 12 KB of sheet and map, about 9 KB of sound |
| Objects | a fixed pool of 40; the busiest room uses 25 |
The port is checked against the cart itself, not against a description of it:
- Golden traces. tools/ref/compare.py runs the cart's own Lua on the PC next to
Game.cpp, on the same button presses. Every object, sound, death and room change is compared every frame. Across 128 runs of 900 frames, covering the title and every room, all of them agree. - The community's TAS. Replayed level by level, 29 of 30 levels clear on the very same frame as the original.
- The whole game. tools/ref/playthrough.py chains the TAS from boot to summit on the board's own numbers. The result is a simulator script that
./cl checkplays through, with a picture of every level.
How this was done, and what to reuse to port the next PICO-8 cart, is in docs/pico8-to-chgame.md.
The code, tools and documentation of the port are under the MIT licence: see LICENSE. The CHGame code under chgame/ keeps its own licences (chgame/NOTICE, chgame/LICENSE).
Celeste Classic's game design, sprites, map, music and sound effects are Maddy Thorson and Noel Berry's, and are not covered by any licence here. The data generated from the cart is in Cheleste/src/assets and Cheleste/src/audio. The original cart is not in the repository. See Cheleste/NOTICE.
- Maddy Thorson and Noel Berry, for Celeste Classic and for Celeste.
- Noel Berry's C# version of the game (MIT), read alongside the cart.
- zepto8 (Sam Hocevar), whose PICO-8 BIOS shows how
foreachreally behaves. - ClassicTAS, whose Any% TAS is the route the tests play.
- Lexaloffle, for PICO-8.
