melonJS: Tiled based games in HTML5

22 July 2011 • Thorbjørn Lindeijer

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.

News Archive

This is an imported post. For comments see the original post on Blogger.