๐Ÿ MapleStory WASM

April 12, 2026 ยท View on GitHub

A WebAssembly port of MapleStory v83, playable directly in your browser.

License: AGPL v3 PRs Welcome

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

  1. WASM Client - The original C++ MapleStory client is compiled to WebAssembly using Emscripten, and web/server.py serves the generated JS/WASM bundle to the browser.
  2. WebSocket Proxy - Browsers cannot make raw TCP connections, so a Python proxy bridges WebSocket connections to Cosmic server over TCP.
  3. LazyFS - A dynamic file system technology that streams game assets (.nx files) 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.
  4. 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:

  1. Take every .wz file from v83 except UI.wz.
  2. Take only UI.wz from v153+.
  3. Run all of those .wz files through the WZ to NX converter to produce .nx files.
  4. Drop the resulting .nx files into maplestory-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:

RequirementVersionPurpose
Python3.9+Local web services
Emscripten3.1+WASM compilation
CMake3.16+Build system
  1. Build the client with ./scripts/build_wasm.sh.
  2. Install the local Python dependency:
pip install -r web/requirements.txt
  1. 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 .
  1. 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.

RequirementVersionNotes
Docker20.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.

VariableDescription
AssetsServerProtocolProtocol for the LazyFS assets WebSocket (ws or wss).
AssetsServerIPIP/Hostname of the LazyFS Assets Server.
AssetsServerPortPort of the LazyFS Assets Server (defaults to 8765).
ProxyIPIP/Hostname of the WebSocket Proxy for game traffic.
ProxyPortPort of the WebSocket Proxy (defaults to 8080).
MapleStoryServerIpIP address of the target Cosmic Server (forwarded by proxy).
MapleStoryServerPortPort of the target Cosmic Server (defaults to 8484).

Docker Environment

The docker-compose.yml provides sensible defaults. Key environment variables:

VariableDefaultDescription
IS_DOCKERtrueEnables Docker-specific networking

๐Ÿ”ง Development

Making Changes

  1. Edit files under src/client/, src/nlnx/, web/, scripts/, or docker/
  2. Keep assets/ unchanged
  3. Rebuild the client with ./scripts/build_wasm.sh
  4. If the local build is unavailable, use ./scripts/docker_build_wasm.sh
  5. Re-test the relevant local or Docker workflow you changed

Build Commands

CommandDescription
./scripts/build_wasm.shBuild WASM client (Release)
./scripts/build_wasm.sh --debugBuild WASM client with debug symbols
./scripts/build_wasm.sh -j 4Build with 4 parallel jobs
./scripts/docker_build_wasm.shBuild WASM client in Docker
./scripts/wz-converter/convert.shConvert local .wz files to .nx files in Docker
./scripts/run_all.shStart the Docker web services
./scripts/docker_web_up.sh -dStart the Docker web services directly
./scripts/stop_all.shStop all services

๐Ÿค Contributing

Contributions are welcome! Please read the guidelines below before submitting.

How to Contribute

  1. Fork the repository
  2. Create a branch for your feature: git checkout -b feature/amazing-feature
  3. Make changes and verify the relevant build and runtime flow
  4. Test your changes locally
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to your fork: git push origin feature/amazing-feature
  7. 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 (.nx or .wz files).
  • 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 โญ