playable, right here
Examples
Twenty-two builds, organized as a curriculum rather than just a feature list:
Level 1 is one concept at a time in well under 100 lines,
Level 2 puts two or three of those together the way a real
screen would, Level 3 is a complete reference game, and
Technical demos cover something specific enough - a render
technique, a headless-only module - that it does not teach mwg's everyday
shape the way the other three do. Every one runs straight from the framework
source and opens the same way a shipped game would: no server behind this
page, just file:// pages sitting in an iframe. Each one lives on
its own page rather than all twenty-two loading at once here - a phone cannot
afford that many live WebGL contexts open on one screen, and neither can most
laptops.
running them yourself
From source
Each example also runs against the framework's live source, so editing src/ reloads the page - append :build to any script below to produce a folder you open from disk with no server at all; see examples/README.md for the full list, grouped the same way as above:
npm run assets # generates examples/assets, once
npm run example:hello-world # Level 1: Game -> Scene -> update(dt), ~50 lines
npm run example:loading # Level 1: LoadQueue + LoadingScreen + AssetStream
npm run example:ui # Level 1: interface, windows/lists/message box
npm run example:movement # Level 1: grid movement, tile collision, TileMap layers, camera
npm run example:save-load # Level 1: SaveSystem alone
npm run example:i18n # Level 1: Catalog, t(), plurals, right-to-left
npm run example:dialogue # Level 2: dialogue scene
npm run example:village # Level 2: village RPG
npm run example:event-system # Level 2: switches/variables/conditions/pages + Inventory via call
npm run example:world-transition # Level 2: World, two maps
npm run example:audio # Level 2: Music.playTracks + Sound
npm run example:battle # Level 2: creature battle
npm run example:minigame # Level 2: lockpick minigame
npm run example:dungeon # Level 3: dungeon crawl
npm run example:chess # Level 3: chess against the built-in engine
npm run example:tower-defense # Level 3: tower defense
npm run example # tech demo: colour-transform
npm run example:3d # tech demo: optional Babylon.js 3D scene
npm run example:headless # tech demo: mwg/simulation, no rendering at all