OSS TanbouSign in with GitHub

Build browser-based 2D and 2.5D games through one API across WebGPU, WebGL 2, and Canvas

OSS scale score 245.3OSS health 93Update pace 56 commits/30dGrowth momentum -4.3
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
6,401
Primary language
JavaScript
License
MIT
Repository last updated
Oct 5, 2026
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.

Sources: [2][4][3]

Official sources

  1. [1]melonjs/melonJS repository metadata(2026-10-04)
  2. [2]melonJS 20.7.0 README(2026-10-04)
  3. [3]melonJS 20.7.0 release(2026-10-04)
  4. [4]melonJS 20.7.0 package metadata(2026-10-04)
  5. [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. 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. 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. 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 )
Check the official README

Growth

Growth trends · Last 30 days

6,401 Stars

0 (0.0%)

Oct 4Oct 5

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

Jul 8Oct 5
Issues openedIssues closed

Pull requests

125 / 122

Jul 8Oct 5
PRs openedPRs merged

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

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
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?