A mostly-complete port of Celeste (2018) to WebAssembly using dotnet's wasmbrowser
template, FNA WASM libraries and FNA.WASM.Sample guide.
- Loading the game consumes too much memory for mobile and lower end devices (standalone html uses even more and is slower to start)
- AOT compilation makes runtime reflection and detouring infeasible, so Everest was not able to be included
- You may encounter issues on firefox.
there is a public build here,a standalone html file here that can be played completely offline, and a tarball if you want to embed this or host it on your own server.
if you can't reproduce this (it's really finnicky) feel free to ask us, the instructions can definitely be improved
- install arch packages
dotnet-host dotnet-runtime dotnet-sdk dotnet-targeting-pack aspnet-runtime fmodstudio xxd wget
& emscripten sdk - clone FNA latest in the parent dir (
../
) - apply
FNA.patch
to FNA - run
sudo dotnet workload restore
in this dir - download the celeste fmod project (with dlc) from fmod download page. fmod official docs for this
- open in fmodstudio and migrate the project
- [optional] click the Assets tab and select every folder, click "add a custom platform encoding setting" and set the compression quality to your taste
- press f7 in fmod studio to export the banks
- Copy the
Content
folder from your celeste install and put it in the root of this project - copy in the exported fmod v2 banks to
Content/FMOD/Desktop/
- go to the releases tab, download celeste.patched.zip.xor, and then run
python3 helpers/xor.py celeste.patched.zip.xor /path/to/your/celeste/install/Content/Dialog/english.txt > celeste.patched.zip
and then extract it intoceleste/Celeste
- run
./patch.sh apply
- run
make statics serve
./patch.sh restore
STRIPFMOD=1 ./patch.sh apply
- run
make singlefile
we couldn't get the output of ilspy to be stable enough for a patch system to work. look in Patches/Code/Celeste for all the changes we made and you will have to rebase them yourself with your own decompiler output. we used ilspy 7.2-rc.
main improvements that need to be done:
- threading so it no longer freezes (waiting for .net 9)
- make a true patching system so that we can easily update to newer versions of celeste
- fix gamepads (currently crashes at emscripten type signature error)
- port over everest (if possible)
- decompile it
- follow instructions over at
FNA.WASM.Sample
to get a basic project up, replacingMyGame
with the default xnaGame
- follow instructions from
FNA.WASM.Sample
for complex asset system (or take a look inhelpers/buildvfs.sh
andsrc/game.js
) - once assets are loading copy in the decompiled game and replace the default
Game
object, copy in anything the Main function does from the original game