Go to file
paradust7 801f59d5b6 Clarify buttons 2023-08-26 14:30:29 +00:00
.github/workflows Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
sources Build file system the right way, using 'make install' and the minetest_game repo 2022-11-09 00:58:09 +00:00
static Clarify buttons 2023-08-26 14:30:29 +00:00
.dockerignore Rename upload.sh to deploy.sh 2022-09-20 05:40:25 +00:00
.gitignore Use local emsdk so that emsdk version can be pinned 2022-12-27 20:44:27 +00:00
Dockerfile Fix Dockerfile 2022-12-27 21:00:27 +00:00
LICENSE Initial commit 2022-03-29 12:27:47 -07:00
README.md Use local emsdk so that emsdk version can be pinned 2022-12-27 20:44:27 +00:00
apply_patches.sh Use local emsdk so that emsdk version can be pinned 2022-12-27 20:44:27 +00:00
build_all.sh Build file system the right way, using 'make install' and the minetest_game repo 2022-11-09 00:58:09 +00:00
build_curl.sh set build parallelism in common.sh 2022-08-07 03:29:20 +00:00
build_freetype.sh Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
build_fsroot.sh Pull in merge of minetest & irrlicht upstream 2023-01-26 12:39:32 -08:00
build_libarchive.sh Add libarchive, switch to WASMFS, use pack file (base.pack) for fsroot 2022-08-06 23:55:39 +00:00
build_libjpeg.sh set build parallelism in common.sh 2022-08-07 03:29:20 +00:00
build_libogg.sh Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
build_libpng.sh Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
build_libvorbis.sh Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
build_minetest.sh Build file system the right way, using 'make install' and the minetest_game repo 2022-11-09 00:58:09 +00:00
build_openssl.sh Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
build_sqlite3.sh Add multiplayer to sample index.html 2023-08-24 16:25:16 +00:00
build_webshims.sh Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
build_www.sh Make it possible to fetch pack files cross-region. Also adds progress bar. 2022-11-07 17:10:45 +00:00
build_zlib.sh Commit some external source archives (for build stability) 2022-08-04 02:23:25 +00:00
build_zstd.sh set build parallelism in common.sh 2022-08-07 03:29:20 +00:00
common.sh Use local emsdk so that emsdk version can be pinned 2022-12-27 20:44:27 +00:00
emsdk_dirperms.patch Add libarchive, switch to WASMFS, use pack file (base.pack) for fsroot 2022-08-06 23:55:39 +00:00
emsdk_emcc.patch Update emsdk patch 2022-11-11 03:04:05 +00:00
emsdk_file_packager.patch Switch to WebGL2, add missing file packager patch 2022-04-24 09:49:41 +00:00
emsdk_setlk.patch Add libarchive, switch to WASMFS, use pack file (base.pack) for fsroot 2022-08-06 23:55:39 +00:00
fetch_sources.sh Pull in merge of minetest & irrlicht upstream 2023-01-26 12:39:32 -08:00
incremental.sh Use a release uuid to manage caching 2022-09-21 00:29:04 +00:00
install_emsdk.sh Use local emsdk so that emsdk version can be pinned 2022-12-27 20:44:27 +00:00
openssl.patch Add openssl and curl for contentdb 2022-04-05 12:14:28 +00:00

README.md

Minetest-wasm

This is an experimental port of Minetest to the web using emscripten/WebAssembly.

System Requirements

This has only been tested on Ubuntu 20.04.

  • Ubuntu: apt-get install -y build-essential cmake tclsh

Building

cd minetest-wasm
./build_all.sh

Installation

If the build completes successfully, the www/ directory will contain the entire application. This includes an .htaccess file which sets headers that are required (by browsers) to load the app. If your webserver does not recognize .htaccess files, you may need to set the headers in another way.

Network Play

By default, the proxy server is set to wss://minetest.dustlabs.io/proxy (see static/launcher.js). This is necessary for network play, since websites cannot open normal TCP/UDP sockets. This proxy is located in California. There are regional proxies which may perform better depending on your location:

North America (Dallas) - wss://na1.dustlabs.io/mtproxy South America (Sao Paulo) - wss://sa1.dustlabs.io/mtproxy Europe (Frankfurt) - wss://eu1.dustlabs.io/mtproxy Asia (Singapore) - wss://ap1.dustlabs.io/mtproxy Australia (Melbourne) - wss://ap2.dustlabs.io/mtproxy

You could also roll your own own custom proxy server. The client code is here:

https://github.com/paradust7/webshims/blob/main/src/emsocket/proxy.js

Custom Emscripten

The Emscripten SDK (emsdk) will be downloaded and installed the first time you build. To provide your own instead, set $EMSDK before building (e.g. using emsdk_env.sh). An external Emscripten may need to be patched by running this exactly once:

./apply_patches.sh /path/to/emsdk