Myth Engine: a Babylon.js game editor with WebGPU, Havok, voxel worlds and playable games

Hi everyone! I’m on the Myth Engine team at 3D Mage. Myth Engine is a visual game editor for Windows, built on Babylon.js. First, thank you to the Babylon.js team and this community: everything we’ve built stands on Babylon.

  • Babylon.js all the way through: you edit inside the game’s own Babylon.js runtime, the same one that runs your exported game in the browser.
  • WebGPU first: games start on WebGPUEngine, with WebGL 2 as the fallback. Babylon’s WebGPU shader translators are bundled with the game rather than fetched from a CDN.
  • Havok built in: set a 3D scene to Rigid Bodies and Babylon’s Havok plugin takes over, with no physics code to write (there’s a clip below).

Play one. Then build it.

2D, 3D and voxel games, all made in Myth Engine. Play the guide games in your browser, no download needed. Each one comes with a free step-by-step guide to build it in Myth Engine from an empty project, and a Starter Kit with every picture the game uses.

Try the free Windows demo (no time limit, and it can follow every guide; publishing needs the full version, $84.99 once) · Join us on Discord
The editor runs on Windows 10 and 11; the games play in the browser on Windows, Mac and Linux.

Made in Myth Engine

And it isn’t only the guide games. Here’s some of what’s being made in Myth Engine right now, several still in progress:

  • Final Intercept: six cities, one battery and a sky full of fire.
  • Crystal Breaker: a prismatic brick-breaker with three bosses: the Crystal Serpent, the Twin Guardians and the Prism Crown.
  • Fathom: a submarine shooter, thirty-six levels deep, all the way down to the Kraken.
  • Tetherwick: Wrong Side Out: a platformer where every place is woven cloth, with a right side and a wrong side.
  • Chain Reaction: build a machine from parts. This one is breakfast for a mouse: a ball trips a switch, a boxing glove sends the next ball flying, and a conveyor delivers the mouse to its cheese.

Watch a level get built

A meadow room from Tetherwick, built in the Scene Editor and then played: the ground first, then the backdrop, the market stall, the signs, Bobbin and the beads. (A time-lapse of real edits.)

Every game in the first video has a free guide that builds it this way, one step at a time. Start with chapter one of Pacific Wings · Play the finished game

Inside the editor

Scene editor

Here’s Sky Ace in the scene editor, with the plane selected: G, R and S (or the handles) move, rotate and scale it, and what you place is what players see.

The same goes for 3D, with Blender’s axes and keys (Z up, G, R and S, a 3D cursor). On the left is a small lakeside scene we built for this post from the editor’s own parts (sculpted terrain, grass, water, shapes and lights); on the right is the same scene in Game View, with a sunset sky, glowing lanterns, depth of field and bloom.

Havok physics

A steel ball dropped on a pyramid of crates, in a scene we put together for this post. The scene’s physics mode is Rigid Bodies, so Havok moves every crate, and there’s no code in the project. In 3D, the capsule character runs on Babylon’s PhysicsCharacterController too.

Science labs

These science labs are made in Myth Engine too. In Push Lab, the same 4 N·s push sends a 1 kg cart off at 4 m/s and a 10 kg cart at 0.4 m/s, on frictionless tracks: the change in velocity is the impulse divided by the mass. Try Push Lab, a free tutorial. Moon View, still in the making, puts the Earth and the Moon in 3D: as the Moon goes round, the small globe shows the phase you’d see from Earth: here it waxes to full, then wanes to a crescent.

Voxel worlds

Turn on generated terrain in a 3D scene, pick a generator and a preset, and the world streams in around the player, with trees, caves and ores; or build block by block in Map Mode. The World Generation editor shapes the land with presets (rolling hills, mountain ranges, island chains and more), landforms, climate and biomes, caves, ores, and trees and plants, and shows a live map before you walk it. Here it’s seed 1337 with the Mountain Ranges preset, previewed 256 blocks across.

And this is that same world, generated in the running game and seen from the south, as the map is laid out: the head of the bay and its beaches at the bottom, the two stone ridges, and the grey highland at the top right.

MusicCraft: a musical voxel world

MusicCraft is a whole game built on Myth Engine’s runtime and voxel engine. Explore the land and a palace of music, and catch singing note creatures by playing their note on the piano; the game teaches you to read music as you go.

Visual Logic

Build game rules by connecting Events and Actions. The blocks handle conditions, loops, functions, typed data and formulas. This is the hard-drop rule from Crystal Cascade, a falling-crystal puzzle.

JavaScript

When you’d rather type, Scripts are plain JavaScript in Monaco (the editor inside VS Code). The editor checks your code as you type and suggests your project’s own objects and sounds. Logic can run a Script with one Action.

Debugger

Put a breakpoint on any Logic block, and Debug Play stops the game right before it runs. From there you can:

  • step by Action, Event or Frame;
  • inspect every instance’s live values, and edit them;
  • pause the moment a variable changes;
  • run the playtest anywhere from 0.05x to 4x speed.

Pixel editor: paint and animate in the engine

Paint sprites right in the engine, with layers, mirror painting, pixel-perfect strokes, indexed color, retro palettes (with palette import and export) and onion-skin animation. Saving updates the game’s art.

Looks: turn your game into an old film, a Game Boy or a thermal camera

Pick a look from the Effect Library and the whole game changes. Here Crystal Cascade switches to Old Film, Old TV, Game Boy, Thermal and Halftone while it plays. A scene can stack up to four looks, the game can switch them while it runs, and the HUD stays crisp.

Want to go further? Open any look’s GLSL and change it; Old Film is 13 lines. Changes preview at once in the game renderer, with a WebGPU check and a performance cost rating.

More editors: objects, enemy stats and particle effects

Objects are built from components. This is one of Sky Ace’s enemy planes, and its stats come from a row of the game’s Enemy Types table, so balancing the game means editing one table. The same editor makes 2D and 3D objects.

Particle effects play live while you tune them, on Babylon’s GPU particles. Start from editable starters (fire, explosions, rain, confetti and more), one switch makes an effect 3D, and Logic fires bursts with no code.

And there’s more

  • A Platformer editor with a check that searches each room for a route, so you know it can be finished.
  • Branching dialogue in Classic RPG or visual novel styles, and illustrated books with page turns and narration.
  • Cutscenes on one timeline, with actors, camera, dialogue, sound and effects.
  • Multiplayer built in, with rooms and a lobby.
  • Builder Mode, where players build their own version of your game within the parts you allow.
  • Rewind Time: record the world and play it backwards.

Built on Babylon.js

In short: WebGPU first with WebGL 2 as the fallback, Havok physics, GPU particles, PBR materials extended with Babylon’s material plugins, cascaded shadows, SSAO and SSR.

The full list: what Myth Engine uses from Babylon.js
  • Engine: WebGPUEngine by default, with Engine (WebGL 2) as the fallback. Babylon’s WebGPU shader translators (glslang and Tint) ship inside every WebGPU game, so nothing is fetched from a CDN at play time. Myth’s own shader code comes in WGSL for WebGPU and GLSL for WebGL 2.
  • Materials: StandardMaterial and the PBR materials (glTF metallic-roughness and specular-glossiness), extended through Babylon’s material plugin system (MaterialPluginBase): toon shading, per-copy color and glow that keeps copies batched, painted terrain layers, capsule shadows, 2D lighting for sprites, and custom voxel surfaces.
  • Lights and shadows: directional, point, spot and hemispheric lights; CascadedShadowGenerator for the sun, with PCF or contact-hardening soft shadows; ClusteredLightContainer for Forward+ (opt-in); GIRSMManager with reflective shadow maps for real-time sunlight bounce; ReflectionProbe; and HDRI skies and reflections from .hdr or .env files.
  • Post-processing: an HDR DefaultRenderingPipeline per 3D camera (bloom, depth of field, FXAA, grain, sharpen, tone mapping, color curves and LUT grading), plus SSAO2RenderingPipeline, SSRRenderingPipeline and HighlightLayer. Looks from the Effect Library run as Babylon post-processes (PostProcess) on the camera.
  • Particles: GPUParticleSystem, attractors included, in the editor preview and in the game.
  • Physics: Havok through HavokPlugin: PhysicsAggregate and PhysicsBody with box, sphere, cylinder, convex hull and mesh shapes, raycasts, and PhysicsCharacterController for the capsule character.
  • 2D: sprites batch through SpriteManager pools (4,096 sprites each), and 2D lights are a material plugin.
  • Models: glTF and GLB through Babylon’s glTF loader, with AnimationGroup animations. Draco and meshopt files are decoded when you import them, so games ship without decoders, and the loader ships only with games that have models.
  • Views: split screen and picture-in-picture through Viewport, and cameras that render into textures through RenderTargetTexture.
  • Performance: occlusion queries, and optional automatic LOD by mesh simplification for still props.
  • The editor: the scene view is the game’s runtime, and the editor draws its own tools on top with an EffectRenderer composite and selection outlines with SelectionOutlineLayer.
Publishing: web, desktop and mobile

Web games come out as a single HTML file for offline play, a web folder (with optional PWA files and a ZIP) or CDN HTML. Desktop comes out as an Electron or Tauri project, and mobile as a Capacitor project for Android and iOS, which you build and sign yourself.

Shader graph and JavaScript libraries

Prefer nodes? Every node in the shader graph shows a live preview, and the same editor makes screen, sprite, 3D surface and voxel surface shaders. Every look in the Effect Library is a starting point.

Add a JavaScript library from the catalog (built-in easing, vector, color and grid helpers with A* pathfinding, or npm packages such as Lodash, nanoid, gl-matrix and mitt), add one by name or link, or import your own .js. Libraries are bundled into the game, so nothing loads at play time, and each one shows its license. Our Chess guide plays against Stockfish this way.

The free demo has no time limit and can follow every guide. Publishing needs the full version: $84.99 once, with no royalties, every update included, and no account, activation or online license check.

Play the games and find their free guides, and when you’re ready, try the free demo or come say hi on Discord.

If you try a game, we’d love to hear which browser you used and how it ran. And if you follow a guide, tell us where you got stuck. Whether you’re new to Babylon.js or know it inside out, thanks for reading, and we can’t wait to see what you make.

5 Likes

This is CRAZY!!! really good job!

1 Like

Thanks! We have been working on it for years!

Damm, that’s an impressive toolset! The demos look super good, great job :open_mouth:

1 Like

Thank you very much!

1 Like

Here’s a closer look at Pitch Shot, one of our Myth Engine games running on Babylon.js.

It’s a musical slingshot game: listen for your target, pull back a note, and let it fly at the matching pitch. The notes are cheerful. The towers have a less relaxing afternoon.

Play Pitch Shot in your browser — turn the sound on before your first shot.

Pitch Shot: a note in flight in Sunny Meadow

For anyone curious about the build, there’s also a free 10-chapter guide that walks through making the game with Myth Engine’s visual Logic:

Build Pitch Shot, step by step

Pitch Shot: the Choose a place screen

If you give it a go, I’d love to hear how the aiming and note-matching feel.

1 Like