frequently asked

FAQ

Is mwg finished?

No, it's early. The shared floor (core, render, assets, ui, stage, roguelike) is built and usable; the RPG-specific modules (rpg, world, battle, actors, i18n, audio) are still evolving. See the examples and documentation for the module map, or the generated API for every signature.

Does mwg come with a map editor?

No, and that's deliberate for now. mwg is a runtime (a tile engine, an event interpreter (once rpg ships), a message box), not an editor. Maps, events and dialogue are kept as plain data rather than code specifically so an editor can be built against that data later without reworking the runtime, and so that in the meantime the data can be written by hand, generated by a script, or exported from Tiled, which is free and already good at this.

Can I use art, data or code from Shattered Pixel Dungeon, ADOM, RPG Maker, Pokémon, Ren'Py, The Battle for Wesnoth, Flare, or Dungeon Crawl Stone Soup?

No, and mwg doesn't either. Those eight are referenced only as design studies: a list of what a finished game of each kind has to do. No code, asset, data table or file format is taken from any of them; mwg implements none of their file formats and reads none of their projects or save data. Shattered Pixel Dungeon (GPL-3, dual-copyright), The Battle for Wesnoth (GPL-2.0-or-later), Flare's Empyrean Campaign (GPL-3), and Dungeon Crawl Stone Soup (GPL-2.0) are all copyleft in particular, exactly the kind of licence you don't want to accidentally inherit into your own game.

What licence is mwg under, and what does that mean for a game I build with it?

mwg itself is MPL-2.0. Games built with it carry no licence obligation of their own: you can ship a commercial, closed-source game. The obligation runs the other way: if you modify one of mwg's own files and distribute that modified copy, those specific changes are shared back under MPL-2.0. Using mwg as a dependency, unmodified, obligates you to nothing.

Why does a game have to be built before it works from a local file?

Opening a page from disk blocks three things a normal web game relies on: ES modules (CORS), fetch()/XHR (no on-demand loading, no directory listing), and cross-origin images (an <img> from a sibling file taints a WebGL texture in Chrome). mwg is shaped around all three (see running from file:// on the overview page), which is why a build step compiles assets into scripts and emits a classic, non-module bundle. The result runs with genuinely no server, forever, which a raw dev build cannot.

Does mwg support languages other than English, or right-to-left text?

mwg/i18n covers message tables with language fallback, plurals, and both right-to-left interface layout and left-to-right, with vertical writing (top-to-bottom, as in traditional Chinese or Japanese) scheduled separately since canvas has no vertical writing mode and needs real per-glyph layout.

Does a player need to install Node, npm, or anything else?

No. Node and npm are developer tools, in the same sense a compiler is: nothing from them reaches the player. A finished game's output is HTML, JavaScript and assets, and that folder is what you distribute; it's opened by double-clicking, exactly like any other file on the player's computer.

What does mwg run on top of, and why?

PixiJS for rendering (MIT) and rot.js (BSD-3-Clause) for the classic roguelike algorithms (field-of-view shadowcasting and A* pathfinding, both of which have had their edge cases worked out over years and are not worth re-deriving. Where mwg needed something those don't provide) is the additive colour term Pixi's tint can't do, or a seeded RNG whose output is specified rather than borrowed from the algorithm library: it's written directly in mwg/two-d/render and mwg/core.