Friday, July 22, 2011

melonJS: Tiled based games in HTML5

Earlier this month I was made aware of the first public release of melonJS. It is a lightweight HTML5 game engine, with very close integration with Tiled.

I'm a complete newbie regarding new-fangled HTML5 and its opportunities for games. JavaScript still reminds me of some horrible experiences back in 2000, when it was slow and incompatible. However, I know the world has changed since then and melonJS basically confirms my suspicions. For small games there is little reason left to compile them to native machine code, and I wonder how many will still know what it means in a few years. The rendering, input and also audio support in modern browsers will suffice for a wide range of games, and deployment couldn't be easier.

As it stands melonJS is not finished yet, and at first sight it seems to be only good for creating the specific kind of platform game that its extensive tutorial takes you through. At least, there is a certain amount of convenience API available that is meant to do just that. However, behind that API lies a promising and well documented game engine with resource management, sprite animation and direct support for Tiled's TMX map format. Including some cool features like support for custom map objects that are directly linked to JavaScript-defined classes and parallax image layers.

How did I get to know all this? After one evening of fiddling around with the engine with the help from the tutorial, I had laid the basics for an HTML5 version of The Mana World, which I called TMW.js. It's lacking a few details, but I daresay it's possible to fill in the blanks!

Update 2013-05: While there is no longer a live version of TMW.js, the code of this demo is still available at, including some experimental multiplayer functionality.


  1. License is TERRIBLE! Not only is the license not meant for code (and likely to be thrown out of court) but it's so restrictive MelonJS isn't even open source. (Though it both claims to be open source and claims to not have a license). Do not get, do not use, use craftyjs or Akihabara, or ANYTHING ELSE!!!

  2. @Anon7A3aheSE

    Please raise your concerns with the melonJS author. To me it seems he only wanted to disallow commercial use of his library, but I agree that his choice of library is unfortunate. It's of course still "open source", but it's not "free software".

  3. @Anon7A3aheSE

    I believe that you misunderstood what I wanted to achieve here with this license, and as Thorbjørn is saying, I just wanted it to be open-source, free (no license fee) but to disallow commercial use of the library (at least without my "permission") until the library reach at least a more mature state.

    Furthermore the CC license includes a waiver that allows for any conditions to be waived if you get the author permission, so for from my understanding it was not TERRIBLE or un-permissive as you seems to believe. But of course maybe I also fully misunderstood that license scheme...

    anyway, you can still drop an email instead of bragging here about the license :)

  4. For those interested, melonJS is now released under the terms of the MIT license.

    Everything has been updated in github ( , website will follow soon with the next release of melonJS.


  5. Can we get those files reuploaded on github or something please?

    1. @TheSisb

      They are already available since a long time on I just forgot to update this blog (but the links in this post were only recently broken). It's still kind of outdated though, as melonJS has seen several new releases since.


Note: Only a member of this blog may post a comment.