Fork me on GitHub

Fresh & lightweight

melonJS is the result of our enthusiasm and past experiments with Javascript, and came from the feeling that no simple, free and standalone library was available to develop games. And although still a work in progress, melonJS already allows to easily create some nice games (see the Gallery page)

Powerful level design through Tiled

melonJS integrates the popular Tiled map format, allowing to easily design levels using the Tiled map editor, and to focus on the game features itself.

Frangoi's Journey - 3rd place at the Global Game Jam 2012 in Brazil, Curitiba
Neverwell Moor - a game built in 3 weeks as part of the Liberated Pixel Cup 2012 competition, using melonJS and Chipmunk-js.

Free and open-source

melonJS is an open-source HTML5 based community game engine, released under the MIT license, that you can join, but that you can also modify or extend in any way to fit your needs.

Feature list :

  • A fresh and lightweight 2D sprite-based engine
  • Standalone library (does not rely on anything else, except a HTML5 capable browser)
  • Compatible with all major browsers (Chrome, Safari, Firefox, Opera, IE) and mobile devices
  • Multi-channel HTML5 audio support and Web Audio on supported devices
  • a lightweight physic implementation to ensure low cpu requirements
  • Polygon (SAT) based collision algorithm for accurate detection and response
  • Fast broad-phase collision detection using spatial partitioning
  • advanced math API for Vector and Matrix
  • Tween effects
  • Transition effects
  • A basic set of Object Entities (to be extended)
  • Object Pooling
  • Basic Particle System
  • Basic animation management
  • Standard spritesheet and Packed Textures (Texture Packer) support
  • A state manager (to easily manage loading, menu, options or in-game screen state and switch)
  • Tiled map format version +0.9.x integration for easy level design :
    • Uncompressed Plain, Base64, CSV and JSON encoded XML tilemap loading
    • Orthogonal, Isometric and Perspective tilemap support
    • Multiple layers (multiple background/Foreground, collision and Image layers)
    • Multiple Tileset support
    • Tileset Transparency settings
    • Layers Alpha settings
    • Rectangle, Ellipse, Polygon and Polyline objects support
    • Tiled Object
    • Flipped & rotated Tiles
    • Dynamic Layer and Object/Group ordering
    • Dynamic Entity loading
    • Shape based Tile collision support
  • System and Bitmap fonts
  • Mouse and Touch device support (with mouse emulation)
  • Device motion & accelerometer support
  • High DPI & auto scaling
  • Built-in support for CocoonJS
  • Asynchronous messaging support (minPubSub)
  • some basic GUI elements
  • a customizable loader, etc. . .
browser icons example

Browser Compatibility

See below about melonJS and compatibility with the various existing browsers.

Chrome 12+fully working
Safari5.0+fully working
Firefox4+fully working
Opera11.00+fully working
IE9+fully working