From 5cac8237f3ec51f860e9ade45d3557dd16ed62d8 Mon Sep 17 00:00:00 2001 From: sickcodes <65906298+sickcodes@users.noreply.github.com> Date: Sat, 2 Apr 2022 02:52:59 +0000 Subject: [PATCH 1/2] Add basic Linux instructions Linux users will need to install `emscripten` and then add emscripten to your PATH `export PATH=$PATH:/usr/lib/emscripten` --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f64aac1..5bece13 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ brew install automake brew install sdl2 sdl2_mixer sdl2_net ``` +Linux users will need to install `emscripten` and then add emscripten to your PATH `export PATH=$PATH:/usr/lib/emscripten` + ## Compiling There are two scripts to facilitate compiling Wasm Doom: From 50ca6b287f697aa312cd4aea248ab89bb7e27ca3 Mon Sep 17 00:00:00 2001 From: sickcodes <65906298+sickcodes@users.noreply.github.com> Date: Sat, 2 Apr 2022 03:04:44 +0000 Subject: [PATCH 2/2] Add php basic instructions ``` # or using PHP cd src php -e -S "localhost:8000" ``` --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5bece13..77d43ab 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is a [Chocolate Doom][1] WebAssembly port with WebSockets [support][4]. You need to install Emscripten and a few other tools first: -``` +```bash brew install emscripten brew install automake brew install sdl2 sdl2_mixer sdl2_net @@ -18,7 +18,7 @@ Linux users will need to install `emscripten` and then add emscripten to your PA There are two scripts to facilitate compiling Wasm Doom: -``` +```bash ./scripts/clean.sh ./scripts/build.sh ``` @@ -27,13 +27,19 @@ There are two scripts to facilitate compiling Wasm Doom: Copy the shareware version of [doom1.wad][3] to [./src][9] (make sure it has the name doom1.wad) -Then: +Then start a web server in `src` directory using python: -``` +```bash cd src python -m SimpleHTTPServer ``` +or using PHP +```bash +cd src +php -e -S "localhost:8000" +``` + Then open your browser and point it to http://0.0.0.0:8000/ Doom should start (local mode, no network). Check [doom-workers][8] if you want to run multiplayer locally.