This project ships the same factory-defense sandbox two ways: one that runs the actual game directly in your browser using a patched JVM, and one that compiles a standalone build you can save and run without a connection. Pick a lane below.
This build runs the real Mindustry .jar — not a rewrite. CheerpJ compiles a
JVM to WebAssembly and executes the game's original bytecode directly in the tab. Because the
desktop game expects a desktop windowing and input stack, the bytecode is patched post-compile:
LWJGL display, input, and file-access calls are rerouted to browser-side equivalents (canvas,
pointer/keyboard events, virtual storage) so the class files behave correctly without touching
the original Java source.
This build starts further upstream. Arc, the engine Mindustry itself is built on,
is forked and modified so its rendering, audio, and I/O layers target the web instead of desktop
backends. That modified engine — plus the game code — is then ahead-of-time compiled from Java to
JavaScript with TeaVM. The result is bundled with all assets into a single self-contained
.html file: open it in any browser, no server, JVM, or network required after download.
| Online — CheerpJ | Offline — TeaVM | |
|---|---|---|
| What's compiled | Unmodified Mindustry .jar bytecode, patched post-build for browser I/O |
A modified fork of Arc + Mindustry, compiled from source |
| Compilation target | JVM → WebAssembly, executed live | Java → JavaScript, ahead-of-time |
| Where it runs | Runs directly in the browser tab (requires internet) | Downloaded once, opened locally |
| Connection needed | Yes, while playing | Only to download |
| Best for | Jumping in immediately | LAN parties, flaky wifi, keeping a copy |