I wrote a blog post explaining the details and I even included a video.
It is hosted on shinyapps.io.
Here is how the game looks once it runs on Shiny:
apt-get install build-essential libsdl2-dev libsdl2-mixer-dev
git clone --depth 1 git@github.com:emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ..
git clone --depth 1 git@github.com:cloudflare/doom-wasm.git
cd doom-wasm && ./scripts/clean.sh && ./scripts/build.sh && cd ..
wget https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad -O doom-wasm/src/doom1.wad
Source app.R
from RStudio or VSCode.
Move the following files:
mkdir doom-compiled
mv doom-wasm/src/index.html doom-compiled/index.html
mv doom-wasm/src/doom1.wad doom-compiled/doom1.wad
mv doom-wasm/src/default.cfg doom-compiled/default.cfg
mv doom-wasm/src/websockets-doom.js doom-compiled/websockets-doom.js
mv doom-wasm/src/websockets-doom.html doom-compiled/websockets-doom.html
mv doom-wasm/src/websockets-doom.wasm doom-compiled/websockets-doom.wasm
mv doom-wasm/src/websockets-doom.wasm.map doom-compiled/websockets-doom.wasm.map
Then change the path in app.R
to doom-compiled
and deploy.
- Space: fire
- E: open door
- up/down/left/right: move
- 1-4: change weapon
- Esc: release mouse/go to menu
- F: full screen
You can also use the mouse to move around.
If you like what I do as a content creator, you can donate on Buy Me a Coffee.