๐ MapleStory WASM
April 12, 2026 ยท View on GitHub
A WebAssembly port of MapleStory v83, playable directly in your browser.
MapleStory WASM brings the classic MapleStory v83 client to modern web browsers using WebAssembly. The repository contains the WASM client build, the local web services used by the browser runtime, and Docker entrypoints for running the web stack. The client is designed to run with Cosmic server.
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Web Server (Python) โ โ Browser (Client) โ
โ web/server.py โโโโโโโโถโ MapleStory WASM Client Runtime โ
โ http://localhost:8000 โ HTTP โ (JS + WASM in browser) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโ
โ โ
โ WebSocket โ WebSocket
โ (Game โ (Asset
โ Packets) โ Requests)
โผ โผ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WS Proxy โ โ Assets Server (Python) โ
โ web/ws_proxy.pyโ โ ws://localhost:8765 โ
โ :8080 โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโฌโโโโโโโโโ
โ TCP
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Cosmic Server (TCP) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
How It Works
- WASM Client - The original C++ MapleStory client is compiled to WebAssembly using Emscripten, and
web/server.pyserves the generated JS/WASM bundle to the browser. - WebSocket Proxy - Browsers cannot make raw TCP connections, so a Python proxy bridges WebSocket connections to Cosmic server over TCP.
- LazyFS - A dynamic file system technology that streams game assets (
.nxfiles) on-demand via WebSocket and caches them locally in your browser. Assets are only fetched from the network once, providing native loading times on subsequent loads. - Containerized Tooling - Docker can be used both for serving the project and as a fallback way to build the WASM client.
โ ๏ธ Required Game Assets
Important
You must provide your own game assets to run this project. We cannot distribute them due to copyright.
1. Client Assets (.nx files)
To put together the asset set:
- Take every
.wzfile from v83 exceptUI.wz. - Take only
UI.wzfrom v153+. - Run all of those
.wzfiles through the WZ to NX converter to produce.nxfiles. - Drop the resulting
.nxfiles intomaplestory-wasm/assets/.
Treat assets/ as read-only once the files are in place โ don't modify anything in it.
๐ Quick Start
Client Build
Prefer the docker build first:
./scripts/docker_build_wasm.sh
Useful variants:
./scripts/docker_build_wasm.sh --debug
./scripts/docker_build_wasm.sh --jobs 4
If the local Emscripten and CMake toolchain is available, you can use the local build:
./scripts/build_wasm.sh
Useful variants:
./scripts/build_wasm.sh --debug
./scripts/build_wasm.sh --jobs 4
Output:
The client build output is written to build/.
Local Deployment
Use local deployment when the toolchain and supporting services are available on the host machine.
Requirements:
| Requirement | Version | Purpose |
|---|---|---|
| Python | 3.9+ | Local web services |
| Emscripten | 3.1+ | WASM compilation |
| CMake | 3.16+ | Build system |
- Build the client with
./scripts/build_wasm.sh. - Install the local Python dependency:
pip install -r web/requirements.txt
- Start the web services from the repository root:
python3 web/server.py
python3 web/ws_proxy.py --ws-port 8080
python3 web/assets_server.py --port 8765 --directory .
- Open http://localhost:8000.
The websocket proxy is intended to forward traffic to a running Cosmic server instance.
Docker Deployment
Use Docker when local deployment is not practical or when you want the containerized stack.
| Requirement | Version | Notes |
|---|---|---|
| Docker | 20.10+ | Includes Docker Compose |
Web stack:
./scripts/run_all.sh
Equivalent direct command:
./scripts/docker_web_up.sh -d
Stop all Docker services:
./scripts/stop_all.sh
Open http://localhost:8000 after the containers are up.
๐ Project Structure
maplestory-wasm/
โโโ ๐ build/ # WASM build output
โโโ ๐ docker/ # Dockerfiles for services
โโโ ๐ scripts/ # Build & run scripts
โโโ ๐ src/
โ โโโ client/ # C++ MapleStory Client
โ โโโ nlnx/ # Shared NX loading library
โโโ ๐ web/ # Web infrastructure
โ โโโ server.py # HTTP server
โ โโโ ws_proxy.py # WebSocket-TCP proxy
โ โโโ assets_server.py # NX asset streaming
โโโ ๐ docker-compose.yml # Docker orchestration
โโโ ๐ LICENSE # AGPL-3.0 License
โโโ ๐ README.md # You are here
โ๏ธ Configuration
Web Client Configuration (web/config.json)
The web/config.json file controls how the browser connects to backend services. If values are missing or null, the client will attempt to auto-detect them or fall back to localhost defaults.
| Variable | Description |
|---|---|
AssetsServerProtocol | Protocol for the LazyFS assets WebSocket (ws or wss). |
AssetsServerIP | IP/Hostname of the LazyFS Assets Server. |
AssetsServerPort | Port of the LazyFS Assets Server (defaults to 8765). |
ProxyIP | IP/Hostname of the WebSocket Proxy for game traffic. |
ProxyPort | Port of the WebSocket Proxy (defaults to 8080). |
MapleStoryServerIp | IP address of the target Cosmic Server (forwarded by proxy). |
MapleStoryServerPort | Port of the target Cosmic Server (defaults to 8484). |
Docker Environment
The docker-compose.yml provides sensible defaults. Key environment variables:
| Variable | Default | Description |
|---|---|---|
IS_DOCKER | true | Enables Docker-specific networking |
๐ง Development
Making Changes
- Edit files under
src/client/,src/nlnx/,web/,scripts/, ordocker/ - Keep
assets/unchanged - Rebuild the client with
./scripts/build_wasm.sh - If the local build is unavailable, use
./scripts/docker_build_wasm.sh - Re-test the relevant local or Docker workflow you changed
Build Commands
| Command | Description |
|---|---|
./scripts/build_wasm.sh | Build WASM client (Release) |
./scripts/build_wasm.sh --debug | Build WASM client with debug symbols |
./scripts/build_wasm.sh -j 4 | Build with 4 parallel jobs |
./scripts/docker_build_wasm.sh | Build WASM client in Docker |
./scripts/wz-converter/convert.sh | Convert local .wz files to .nx files in Docker |
./scripts/run_all.sh | Start the Docker web services |
./scripts/docker_web_up.sh -d | Start the Docker web services directly |
./scripts/stop_all.sh | Stop all services |
๐ค Contributing
Contributions are welcome! Please read the guidelines below before submitting.
How to Contribute
- Fork the repository
- Create a branch for your feature:
git checkout -b feature/amazing-feature - Make changes and verify the relevant build and runtime flow
- Test your changes locally
- Commit your changes:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature - Open a Pull Request
Code Guidelines
- Follow the existing code style in each project (C++, Python, shell scripts)
- Keep changes focused and well-documented
- Test across multiple browsers when modifying client code
- Update documentation for user-facing changes
Areas for Contribution
- ๐ Bug fixes and stability improvements
- ๐ฎ Missing game features (skills, NPCs, quests)
- ๐ Documentation improvements
- ๐งช Testing and QA
- ๐จ UI/UX enhancements
โ ๏ธ Disclaimer
This project is for educational and preservation purposes only.
- MapleStory is a trademark of NEXON Korea Corporation.
- All game assets, art, music, and related content are copyright of their respective owners.
- This project does not distribute any copyrighted game assets.
- Users must provide their own legal copies of game assets (
.nxor.wzfiles). - This project is not affiliated with, endorsed by, or connected to NEXON in any way.
Use responsibly and respect intellectual property rights.
๐ License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
See the LICENSE file for full details.
Happy Mapling! ๐
If this project brings back memories, consider giving it a โญ