Cytopia icon indicating copy to clipboard operation
Cytopia copied to clipboard

Port Cytopia to emscripten

Open SimplyLiz opened this issue 5 years ago • 1 comments

Port Cytopia to emscripten and host the build on our website.

I've already started working on this and pretty much is already done, but haven't commited the code changes yet.

Notes: I've started working on this on linux, but i couldn't get emscripten to work. On Windows, it worked instantly, but stopped working after a time because of a bug in emscripten in latest release. I'll continue working on this once i have my new laptop set up.

See: https://game.cytopia.net

SDL_mixer support is still missing. The game crashes when save / load game is called. (Find out how we can open a browser save / load dialog)

SimplyLiz avatar Apr 14 '19 17:04 SimplyLiz

I created a branch "emscripten" for the port.

To build it:

Activate emscripten SDK

~/.conan/data/emsdk_installer/1.39.6/bincrafters/stable/package/1492a59deb6efdf29776a5734de63fc5f5c58650/emsdk_env.shemsdk activate latest
source ~/.conan/data/emsdk_installer/1.39.6/bincrafters/stable/package/1492a59deb6efdf29776a5734de63fc5f5c58650/emsdk_env.sh
export PATH=~/.conan/data/emsdk_installer/1.39.6/bincrafters/stable/package/1492a59deb6efdf29776a5734de63fc5f5c58650:~/.conan/data/emsdk_installer/1.39.6/bincrafters/stable/package/1492a59deb6efdf29776a5734de63fc5f5c58650/node/12.9.1_64bit/bin:~/.conan/data/emsdk_installer/1.39.6/bincrafters/stable/package/1492a59deb6efdf29776a5734de63fc5f5c58650/upstream/emscripten:$PATH

emcmake cmake -DCROSSBUILD_EMSCRIPTEN=ON -DENABLE_AUDIO=OFF -DENABLE_ANGELSCRIPT=OFF -DENABLE_MOFILEREADER=OFF ../Cytopia

SimplyLiz avatar Feb 17 '20 17:02 SimplyLiz