Skip to content
mazmazz edited this page Jun 10, 2020 · 2 revisions

Current Issues - 6/3/2020

  • No fullscreen support
  • Mouse support is buggy
  • Slow on iOS, also crashy
  • No OpenGL -- fix may be possible
  • No netgames -- won't be fixed unless WebRTC is adopted by master.

How to Build

See emscripten/README.md for build information.

Build instructions -- requires python3:

# Install emscripten
# https://emscripten.org/docs/getting_started/downloads.html
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh

# Get repo source -- if starting from scratch
git clone https://github.com/mazmazz/SRB2.git
cd SRB2
git checkout emscripten-new

# Or, if you already have SRB2 source
cd SRB2
git remote add mazmazz https://github.com/mazmazz/SRB2.git
git checkout mazmazz/emscripten-new

# Build
emmake make -C src/

# Download assets into staging folder
cd emscripten
mkdir data
wget https://github.com/mazmazz/SRB2/releases/download/SRB2_assets_220/srb2-2.2.4-assets.7z
wget https://github.com/mazmazz/SRB2/releases/download/SRB2_assets_220/srb2-2.2.4-optional-assets-em.7z
7z x ./srb2-2.2.4-assets.7z -o./data
7z x ./srb2-2.2.4-optional-assets-em.7z -o./data

# Run packaging script
python3 ./emscripten-package.py 2.2.4 --ewad music.dta --out-zip srb2-web.zip

This constructs a staging area in [repo_root]/emscripten/staging and zips it into srb2-web.zip.

Clone this wiki locally