aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit 92e3b10807c5101000a95e65cc6dd3b8e08b7602
parent ffe895229d7a7c87369d03c13d086695e2b811d8
Author: anon <anon@example.com>
Date:   Sun, 18 Oct 2026 04:53:22 +0000

Keep generated browser bundles outside Git

Diffstat:
M.gitignore | 2+-
MREADME.md | 43+++++++++++++++++++++++++++++++++++++++----
2 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -3,7 +3,7 @@ /anarchy-runtime-14.9.1/ /anarchy-assets-14.9.1/ /.runtime-bundle -/client/*-test.* +/client/ /client-*/ /local/ /toolchains/ diff --git a/README.md b/README.md @@ -2,9 +2,19 @@ ## Build and run -Run commands from the repository root. The browser client and compressed runtime -data are checked in. Ordinary server development needs Go 1.24 or newer; it does -not need Emscripten, Python, Make, a C compiler, or the original Windows client. +Run commands from the repository root. Compressed runtime data is checked in; +the compiled browser client is kept outside Git. Server development needs Go +1.24 or newer and a copy of the five matching files in `client/`: +`index.html`, `game.js`, `game.wasm.gz`, `profile-worker.js`, and `build.json`. +Copy the entire directory from a client build machine, preserving timestamps: + +```sh +rsync -a workstation:/path/to/ao/client/ ./client/ +``` + +Alternatively use `scp -pr workstation:/path/to/ao/client .`. No Emscripten, +Python, Make, C compiler, or original Windows client is needed on this machine. +Then start the server: ```sh go run ./server @@ -41,6 +51,31 @@ HTTP remains available, including `http://<server-address>:8080/control`. go run ./server ``` +### Build the browser client on Debian + +Only the client build machine needs this toolchain. Install the native build +dependencies and the pinned Emscripten SDK once: + +```sh +sudo apt-get install build-essential cmake pkg-config git python3 xz-utils ca-certificates +mkdir -p toolchains +git clone https://github.com/emscripten-core/emsdk.git toolchains/emsdk +./toolchains/emsdk/emsdk install 6.0.12 +./toolchains/emsdk/emsdk activate 6.0.12 +``` + +Build and publish the client: + +```sh +make wasm -j8 +``` + +This downloads/builds the audio dependencies, compiles the game, and writes the +five files above to ignored `client/`, where Go serves them. The first build is +heavy; allow several gigabytes of build space and substantial compilation time. +Copy the complete matching bundle to other machines after validating it. Do not +mix JavaScript and WASM from different builds or commit generated client files. + ### Original Windows client (PowerShell) ```powershell @@ -146,7 +181,7 @@ The server may need network access on its first build to download Go modules. | `src/data/`, `src/vendor/` | Non-code game initializers and translated support libraries. | | `src/tests/` | Native contract and regression tests. | | `server/`, `data/` | Go server, extracted world data, and local saved characters. | -| `client/` | Published browser page, JavaScript and compressed WASM; served by Go. | +| `client/` | Ignored browser build or copied bundle; served by Go. | | `runtime/` | Compressed runtime data, unpacked automatically on first server run. | | `anarchy-vanilla-14.9.1/` | Local original game for Windows reference comparisons. | | `anarchy-runtime-14.9.1/` | Windows runtime assets and native vendor DLLs. |