new home for the melonJS blog!

August 15, 2013

melonJS finally has its own place for its blog : blog.melonjs.org !

so be sure to update your favorites if you were using this blog address 🙂


melonJS 0.9.8 – even more mobile !

July 6, 2013

Hi all,

Smaller release this time, but we still managed to squeeze some good stuff into this new 0.9.8 version :

  • First we have better support for windows 8 based devices (laptop, tablet, phone) including multitouch support, as the event management has been updated to support pointer event based platforms (See as well the new “multitouch” example provided with melonJS that shows how to properly use the event API in melonJS).FF mobile
  • We fixed melonJS so that it can run under the brand new Firefox OS for mobile, and we are definitely looking forward seeing some great stuff running on this platform !
  • The rendering loop has been rewritten and now uses requestAnimationFrame by default, which should also help in providing a smoother experience on mobile device supporting it.
  • Shoebox support has been added for renderable  (at least we support a free texture packer tool. As with TexturePacker in the previous 0.9.7 release, this will help building  more memory optimized game, when targeting devices with limited memory resource.

For more details and other additions and enhancements, you can have a look at the changelog

And as always the upgrade guide has been updated (very few changes this time, so upgrade should be easier than last time) :


Thank you as well to everyone that contributed to this release, either by providing code changes or fix, but also for your feedback and bug reports !

Cheers, and happy Summer time to all of you !

the melonJS team 😛


melonJS 0.9.7 – the mobile edition !

May 6, 2013

Hi All,

So many things to say for this release !

First right thing to do is probably highlighting the fact that melonJS is now officially supported by a real team ! As, although it was actually already the case since a couple of releases (but more informally), Jason Oster is now officially part of the melonJS development team, helping in bringing more new features and fun faster than light. For those not knowing him yet, Jason is also a talented game developer and keep entertaining us with regular original creation like his last one : sprung fever.

To reflect this change in our melonJS team organization, we now moved the previous repository into an organization based one, which is now available here (be sure to update your bookmarks, as many other links like documentation, or the tutorial also changed to reflect this).

Then about this new release itself, plenty of exciting things to say :

  • We added support for Texture Packer : to optimize memory usage and loading time
  • We added JSON format support for TMX Tiled maps : so that no browsers can complain anymore about the TMX format 🙂
  • We added built-in support for CocoonJS, through the JSON format of course, but as well through direct and automatic usage of specific extension : to ease deployment of melonJS based games on mobile devices.
  • We redesigned Object Entity hierarchy/inheritance to use a renderable component approach (that will now hold the “drawable” part of the entity) : to simplify object definition and also allow for more flexibility with 3rd-party “drawable” components (who says spine?).
  • We Largely improved the Font and Bitmap Font objects (multi-line support, cleaned the API, etc..)
  • And so many other things, that you should rather have a look at the Changelog

Now, taking in account features added in previous version of melonJS like Object Pooling, or dynamic map rendering, I think we definitely have a version ready for the mobile and tablet world, and we are definitely looking forward seeing more stuff deployed on any “store” out-there !

Talking about deploying stuff, be sure as well to consult our wiki, we have some good stuff there like a FAQ, various links, and specially the upgrade guide  that will help you identify the point of attention when upgrading from a previous version.

For the near future, more fancy things are also coming, we decided now to keep the development cycle as short of possible (ideally 2 or 3 months maxisum) and for the next 0.9.8 milestone , amongst the numerous identified tickets, Jason is currently cooking us something with the objective to revamp the aging current built-in collision detection, with something offering better performances, better physics and a multi-phase collision detection algorithm !

Finally, I would like to thank the melonJS community, which is really really getting bigger and bigger every day, and that not only provides us with much valuable feedback, bug reports, but as well with numerous patches. So to name a few, thank you bsparks (yes we finally switch to grunt), Andyveliz, jvalduvieco, DblK, agmcleod, vegar, and many others that helped us during this release !

Stay tuned for version 0.9.8, and have fun !
The melonJS team.


melonJS 0.9.5 is finally here !

February 4, 2013


With Tiled 0.9.0 being now released, and just in time before the Chinese new year (and the year of the snake), it’s also time for us to finally release the new 0.9.5 version of melonJS !

So, concerning the new stuff, and on top of the usual code cleaning, lots of bug fixes and some other useful API additions, here are the main new features (If I did not forget anything) :

    * Parallax layers support is now fully based on the new Image Layer feature from Tiled 0.9.0
    * Added support for Object Pooling (to help limiting memory garbage collection)
    * melonJS now uses Daniel Lamb minPubSub library for event publishing (init, loader, etc…)
    * Added video auto-scaling and fullscreen features
    * Added automatic management of floating object
    * Added a basic plugin API (which will ease extending melonJS)
    * Added a default simple debug plugin (to help debugging games, performances and memory usage)
    * Better mouse/touch event handling
    * Improved collision support (multiple collision, per type check)
    * Partial compatibility fix for cocoonJS (TMX loading is still a problem though, due to XML loading not being supported in cocoonJS) (a new version of cocoonJS has just been released with support for native XML loading)
    * Bunch of new examples : whack-a-mole and a new platfomer demo that replaces (for legal reasons) the previous alex kidd samples.

For the rest and more details, please see the full changes on github for more details.

Most of the changes in this release are backward compatible in terms of API, but for the API breaking changes (because yes, your game won’t probably work just after you upgraded), we have been documented them on the wiki (here). If you however see anything missing or wrong please stop by the forum, and we will complete the wiki accordingly.

A big thank also go to all the people that contributed to this release, I don’t want to miss anyone here so I will just redirect you to the contributor list. Thank you again guys, this release is also possible thanks to you ! the melonJS “philosophy” is to be a free, open-source and a community based game engine, and we really getting there 🙂

Also, for those who noticed, there is since a few months a Paypal and Flattr button on the website, and I would like also to thanks all the one that donated, as this year (or last year now), it fully covered all the cost for hosting, domain name, VPN, etc.. 🙂

And finally, make sure to have a look at the updated gallery page, as since the last 0.9.4, lost of talented people managed to create some awesome stuff with melonJS !

Thank you again to all of you, and the melonJS community hope you will keep having fun with this new version.

Let’s work on the next 0.9.6 version now !



melonJS 0.9.4 – summer release

August 14, 2012

Dear melonJS friends,

Although this is summer holiday, we have been working hard between two naps and a cocktail, and I’m happy to announce that melonJS 0.9.4 is today available.

So “what’s new under the cocotrees” you will ask me :

  • A ton of bug fixes here and there
  • new dynamic rendering method
  • fixed memory leaks (when changing levels, removing objects, etc…)
  • added rotation support for sprite based object (using anchor points)
  • added Image layer support (require Tiled daily build)
  • fixed mouse event detection for floating objects
  • added vertical parallax background
  • fixed display of map that are smaller than the viewport
  • other small new features and under the hood general improvements

Please see the full changes on github for more details, and everything is of course available through the melonJS download page.

About the new dynamic rendering method : As opposed to the previous “off-screen” rendering one, melonJS will now dynamically render the visible part of the layer, with the benefit to use much more less memory (as there is no more a big off-screen canvas created per layer) and to offer better performance for simple layers, while however more complex layers might be slower to render. This is of course configurable for all the layers (through the global me.sys.preRender flag), or per layer by setting the “preRender” property in the layer properties in Tiled (depending of you game, you might use one or the other, or both).

note : dynamic rendering is now the default rendering method, and as I was saying if you want to completely turn it off for you, just use the corresponding global flag.

There are a lots of talented people that made awesome releases since my last post, Ravetracer with his Cachania RPG, more recently Newagebegins with his Exolon remake, and others I probably (I’m sorry) forgot while writing these lines, but for this release I’d like to particularly thanks Jason Oster that provided with tons of feedback and bug fixing, while working on his amazing contribution for the Liberated Pixel Cup.

Please have a look at his blog here where you can relive his journey and find out how he even managed to integrate the chipmunk physic library with melonJS, and try his entry here at indiedb.com. Thank you again Jason, and I wish you all the luck possible for the contest result !

Talking about contest that makes me think as well about another great game, that was part of the LD23 back in April, I’m calling Escape from minimars !

For the next release, we definitely have some good stuff in the pipe, so stay tuned on the melonJS channel, and don’t hesitate to pay us a visit to our forum to tell us what you are doing during this summer 🙂

Have fun !


melonJS 0.9.3

May 1, 2012

Hi there !

I’m pleased to announce that melonJS 0.9.3 is now available !

So to make a long story short, the big change is this release is probably the rewritten mouse event management and the touch event support, which means that melonJS is finally and definitely ready for the mobile device world !  But else, to give you a light change log :

  • Better error management, to better track down issues during development
  • Better documentation, including previously undocumented TMX stuff.
  • New mouse event management (with mouse event emulation on touch devices)
  • Touch event management (including multitouch)
  • Better TMX integration
  • Isometric and Perspective map support (no built-in collision map)
  • A lots of optimization, bug fix and small helpful features

Please see the full changes on github for more details on this new version, and as previously, everything is available through the melonJS download page.

I would like as well to thank everybody that participated in this release, by proposing changes, submitting bug report, feedback, etc… and  I will specially thank here xw332 that helped me correcting a couple of nasty bugs, and Norb with who we worked a lot on the new mouse event management and then the touch event support. Furthermore, the “melonJS community” is growing every day and, for those not coming on the forums, we have a lots of quality production on the way, and I hope to publish here soon about it and introduce those games to you and their respective talented developers 🙂

For the next release, we have some good stuff already planned as well, in the mean time you can come to our forum for a sneak peak at them, but I hope to see you back here by then.

Have fun !


melonJS featured games

February 13, 2012

Recently, some high-quality productions based on melonJS are starting to show up, which of course makes me very happy, and I wanted to share with you two of the last best ones.

So, we will start with Bitzz by Tiago Almeida :

Chaos is an evil virus that infected Bitzz. You must be fast and help Bitzz escaping, reaching the portal, in the less time possible!

What are you waiting for? Go!

Bitzz was built with HTML5 and Javascript using of course melonJS, but also scoreoid for Global Scores, Best Scores and Player Management. Tiago Almeida is a freelancer from Portugal who loves what he does. He developed the game, created the graphic design and the sounds.

Concerning scoreoid, I would also highly encourage you to check their website, as they are providing a very nice solution for global score management, see the following description from their page:

Scoreoid, developed by game developers for game developers, is a non-restrictive, reliable and easy to use gaming platform designed to handle but not limited to scoring, leaderboards and game management, including advanced functions such as platform content awareness, for multi-platform games.

click here to try blitzz or here  for a video of it running and more details from the scoreiod showcase page.

Tiago also generously released his game as open-source to the community and is now available at the following github repository.

Then for our next game, I’m calling : Frangoi’s Journey  !

Frangoi’s Journey is a game prototype developed in only 40hours during the 2012’s Global Game Jam, made using melonJS. And athough in development stage, this game is already very promising with an original gameplay and polished graphics.

Frangoi is an old Alchemist who wishes to find the secret formula of a potion that can give the immortality. He can travel between 2 parallel words in order to find the elements for the immortality potion.

You can play the game from the project homepage (there is even a FB link at the bottom of their page) and as well follow the project evolution/development on github.

That’s it for today  !

Have fun 🙂


melonJS 0.9.2

December 31, 2011

melonJS 0.9.2 available !

I’m happy to anounce that melonJS 0.9.2 is now officially available for download.

There is no real revolution inside, but a lots of nice features an improvement that will make everybody’s life easier (multiple line spritesheet/fontsheet, friction management, code optimization, better documentation, etc…). Some of them are also based on feedbacks or help of some of you (scan, Ben2303, Anthony, Lucas to name a few), so thank you very much !

Please see the full changelog on github for more details on this new version, and also the online documentation. And as previously, everything is available through the melonJS download page.

Additionally, and as explained in my last post, the biggest changes is maybe that melonJS is now released under the terms of The MIT license. This is a popular, human-readable and simple license, that everybody knows and understand, and I believe that most of you will be happy about it.

Please also don’t hesitate to step by the melonJS forum and say hello 🙂

Updating your game to work with melonJS 0.9.2 :

Following a few API changes in this new version, here is a couple of tips to ease the upgrade from a previous version of melonJS.

 1/Check for player movement :

-> In the previous version of melonJS, the updateMovement() function was returning a Boolean, indicating if your player movement has changed (final velocity different from 0) :

// check & update player movement
var updated = this.updateMovement();
// update animation if updated
if (updated)
   // update objet animation
   return true;
return false;

-> In the 0.9.2 version of melonJS, the updateMovement() function now returns a collision “vector”, giving you indication on how you collided with the environment (the level itself, not other entities). Assuming that you don’t need that information, if you just want to upgrade you existing game, the simple solution is to do the following :

// check & update player movement
// update animation if updated
if (this.vel.x!=0 || this.vel.y!=0)
   // update objet animation
   return true;
return false;

As you can see, we replace the “updated” variable by a check on (this.vel.x!=0 || this.vel.y!=0), and since this what was returned by the updateMovement in the previous version, it gives us exactly the same behavior.

2/fadeIn/fadeout effect :

in melonJS 0.9.2, the fade effect are now taking as input a duration in ms, where it was in framecount for the previous version :

before :

// set a fade transition effect
me.state.transition("fade","#000000", 30); // 30 frame

now :

// set a fade transition effect
me.state.transition("fade","#000000", 500); // 500ms

One last word : let’s eat some fish !

And finally I’ve been working on this demo. I had lots of questions about “is it possible to do something else than a platform  games with melonJS?”, so I did something else ! it’s not at the stage I wanted to (it missing a few points to make it really nice), but I will update it later.

So, in a few words :

– it’s a fish game (woow!)
– the main player control the big fish
– you must eat the small fish to survive (or your life bar will keep decreasing)
– the more fish you eat, the bigger you become, making it more harder to avoid the jellyfish
– if you are too big, you can fart to get smaller. you can also fart on the jellyfish to kill them.

The demos is here : www.melonjs.org/demos/fishwar/

Have a fun !


melonJS License

December 18, 2011

With melonJS 0.9.2 about to be released, I wanted to clarify the license model for melonJS.

I believe that most of the people fully misunderstood my choice of the Common Creative License (Non Commercial Share-Alike), and the statement where I was saying that the library was free for private usage. I never intended to disallow commercial usage of it, but melonJS being then in early stage, my intention was just to create a dialog with people willing to use it (for commercial usage) and avoid a situation where “serious” developers would come back and complain about everything (and for sure people, including myself, love to complain even for free stuff).

Anyway, following some long debate here, and even an email from the people at Creative Common, I finally decided to relax the license model, and to change from the CC one, to the MIT license.

The MIT license is a popular, human-readable and simple license, that everybody knows and understand, and I believe that most of you will be happy about it.

I already updated the necessary files in github for those interested, and the website should follow in a couple of days, when I will officially release the new 0.9.2 version.

Last but not least, melonJS being an open-source project, I still hope that some of you will come back with some nice additions to the library, and to finally build some community spirit around the engine. Despite of my poor choice of license, this was my goal since day 1, when I decided to publically release melonJS.

That’s all, thank you for reading, and have fun !


melonJS & The Chronicles of Link

October 30, 2011

Sounds like a music band, right ?

But it’s not ! I actually wanted to post about this very nice remake/clone that Anthony brilliantly managed to put together using melonJS. And although being “only” a WIP demo for now, it looks really promising and shows (proves?) that melonJS is not only tailored for platform games, as lots of people seems to believe. And I must admit that I was myself impressed to see how fast Anthony built a first version !

You can visit his page here to try it, for more information about the game progress and status, and/or if you want to contact Anthony.

And finally, since last release a google group has been created as well, so feel free to pay us a visit there and discuss about melonJS with us 🙂


And as always, have fun !