Saturday, September 17, 2011

melonJS performances

Hi there !

With melonJS 0.9.1 being almost ready, I spent some time today doing a quick benchmark to see what was the real benefits of the code rewrite and few optimizations I put here and there.

So here is a small table showing the CPU usage for both version, this is also not a really extensive benchmark, as I just done on it my main development machine, which is powered by a C2D 2.66ghz, and running OSX 10.6.8 :

As you can see the new version shows (in average) more than 16% performances increase on my configuration, which is not bad at all I think. Oh, and I forgot to add that I used Alex4 for the benchmark, which is a high demanding game in terms of resources, since it's using 3 parallax layers, etc...

melonJS 0.9.1 is mostly a bug fixing release but will also add some cool new features. Better Tiled Integration, and most of all Dirty Rectangle (that was disabled for the above benchmark). It will however still be tagged as "beta" when I will release it (since I still need more extensive testing, and some adjustment), but it will finally allow me to go to my next goal which is mobile devices, where I believe should be quite useful.

Still concerning performances and dirty rectangle, I have a 15% CPU usage (on the same machine) for my dirty Rectangle example, that uses (of course) a non scrolling level, and a canvas size of 1024x768. On my CoreDuo 2Ghz laptop, the same example is running at full speed (60fps), where before, without dirtyRect, it was struggling to reach 34fps. Nice, no ?

I'll write later about the next version, but for those interested, you can have a look at the changelog on github (should be almost up-to-date).

Cheers !


  1. Hi Olivier,

    I was wondering what kind of performance you see on mobile devices (for example, the iPad)?


  2. It's been a while since my last test on the iPad, it was at the time of version 0.7 something (it wasn't even public at that time).

    But it was not so bad, but not very awesome in the mean time, I remember that at that time I used franckJr to do a quick benchmark, and it was reaching almost 25FPS, which is not bad, but the game itself was very simple. Since that I made a lots of progress, and lately even implemented a dirty rectangle mechanism. So I'm not pretending to reach 60FPS for very complex games, but I'm also very curious to see what result I could achieve today :)

    It's anyway my next target, I got a brand new iPad2 recently, and the only thing missing now (since I have the dirty rect stuff more or less working) is to implement touch event !

  3. [...] melonJS performances melonJS 0.9.1 available October 6, [...]

  4. What's up, just wanted to tell you, I enjoyed this post. It was inspiring. Keep on posting!

  5. It is extremely easy to find Assignment Help Adelaide services however there is no better facility than the LiveWebTutors platform. You can access our services from any nook and cranny of Adelaide and get an opportunity to work with the pioneers of the academic writing industry.

  6. Se state cercando qualche info utile su casino in generale o una cosa particolare - scopri qui

  7. Your blogs are great.Are you also searching for philosophy of nursing? we are the best solution for you. We are best known for delivering nursing writing services to students without having to break the bank.