On this page
Overview
melonJS is a JavaScript game engine for building 2D and 2.5D games that run in a browser. It combines rendering, physics, input, audio, cameras, and tile maps in one ES module, selecting WebGPU, WebGL 2, or Canvas for the available environment. Direct loading for Tiled maps and glTF or GLB scenes lets a project focus on game behavior instead of assembling a rendering stack first.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Run the same game code across rendering backends
A Canvas2D-inspired API sits above automatic selection of WebGPU, WebGL 2, and Canvas. Sprites, cameras, particles, post-processing, and custom shaders remain engine components across those paths, reducing the amount of game logic that must be rewritten for each renderer.
Sources: [2]
Load authored Tiled maps and glTF scenes into the game workflow
The engine loads orthogonal, isometric, hexagonal, and other Tiled maps, while glTF and GLB scenes can bring in meshes, materials, cameras, lights, and animation. Physics, input, audio, and UI are included as well, supporting a path from prototype to a compact finished game on one runtime.
Sources: [2]
Best fit
Fits browser-first games that need an integrated 2D stack
It is a good fit for tile-based action games and RPGs, projects that already use Canvas concepts, and 2D productions that add selected 3D assets. A TypeScript and Vite scaffold provides a quick start without locking the project to a proprietary authoring tool.
Sources: [2]
Before adoption
Test target browsers and the version 20 runtime requirements
When WebGPU is unavailable, the engine falls back to WebGL 2 or Canvas, and performance characteristics can change even when features remain available. Version 20 no longer has a WebGL 1 rendering path, so older devices need direct testing. The 20.7.0 package development environment requires Node.js 24 or newer; asset weight, browser audio policies, and each input mode also need separate validation.
Official sources
- [1]melonjs/melonJS repository metadata(2026-10-04)
- [2]melonJS 20.7.0 README(2026-10-04)
- [3]melonJS 20.7.0 release(2026-10-04)
- [4]melonJS 20.7.0 package metadata(2026-10-04)
- [5]melonJS 20.7.0 MIT license(2026-10-04)
Supplemental curator note
When comparing game engines, evaluate the renderer selected on target devices and how authored maps and 3D assets enter the project, not only the feature list. If older devices matter, measure playability after fallback to Canvas early.
Try it in 3 steps
- 1
Create a game scaffold
Use Node.js 24 or newer with npm and pin the official creator to 1.0.1 to scaffold TypeScript, Vite, and the debug plugin.
npm create melonjs@1.0.1 my-game - 2
Install project dependencies
Enter my-game and install its dependencies. Continue in the same terminal and working directory for the next step. The creator is pinned to 1.0.1, but the template uses dependency ranges, so retain the generated lockfile for reproducible installs.
cd my-game && npm install - 3
Start the development server
Start the installed Vite Node entry point directly, bound only to 127.0.0.1:4173, and make up to 30 requests capped at two seconds each until a non-empty entry page responds. Wait for and reap that exact PID after success or failure. Check game interaction and rendering compatibility separately in a browser.
( node node_modules/vite/bin/vite.js --host 127.0.0.1 --port 4173 --strictPort > melonjs-dev.log 2>&1 & server_pid=$!; trap 'kill "$server_pid" 2>/dev/null || true; wait "$server_pid" 2>/dev/null || true' EXIT; ready=0; for attempt in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30; do if curl -fsS --connect-timeout 1 --max-time 2 http://127.0.0.1:4173/ -o melonjs-home.html; then ready=1; break; fi; kill -0 "$server_pid" 2>/dev/null || { cat melonjs-dev.log; exit 1; }; sleep 1; done; if test "$ready" != 1; then cat melonjs-dev.log; exit 1; fi; test -s melonjs-home.html )
Growth
Growth trends · Last 30 days
6,401 Stars
0 (0.0%)
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 56
- Open PRs
- 2
- Issues opened
- 45
- Issues closed
- 52
- PRs opened
- 125
- PRs merged
- 122
Issues
45 / 52
Pull requests
125 / 122
Maintenance
- Median first response
- Not specified
- Issue response rate
- No eligible issues
Based on up to the 100 newest issues opened by external users in the last 90 days. A first comment from an OWNER, MEMBER, or COLLABORATOR counts as a response; issues whose full comment history cannot be checked are excluded. The median and response rate update weekly.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- melonjs
- javascript
- game-engine
- webgl
- webaudio
- html5
- es6
- gamedev
- game-development
- canvas2d
- tiled
- 2d-game-engine
- Stars
- 6,401
- Forks
- 663
- Watchers
- 168
- Open issues
- 19
- Contributors
- 73
- Owner type
- Organization
- Primary language
- JavaScript
- License
- MIT
- Repository last updated
- Oct 5, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Highlight.js25,005 Stars
3 shared tag(s) · Same language
highlight source code with more than 180 language definitions and optionally auto-detect the language
JavaScript - js-cookie22,573 Stars
3 shared tag(s) · Same language
manage browser cookie creation, reads, removal, and attributes through a small JavaScript API
JavaScript - Autoprefixer22,211 Stars
3 shared tag(s) · Same language
generate only the vendor prefixes required by Browserslist and Can I Use data
JavaScript - Expo52,566 Stars
5 shared tag(s)
build React Native apps for Android, iOS, and web from one project model
TypeScript - Electron123,388 Stars
4 shared tag(s)
bundle Chromium and Node.js to build desktop applications for three major operating systems with HTML, CSS, and JavaScript
C++ - Storybook91,200 Stars
4 shared tag(s)
capture UI states once and reuse them across docs, interaction tests, and agent tooling
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.