MelonJS for Mobile

78 views
Skip to first unread message

secretm...@gmail.com

unread,
May 16, 2013, 2:01:02 AM5/16/13
to mel...@googlegroups.com
Hey guys, is there any benchmarks for MelonJS when run on Mobile? Is MelonJS optimized enough that one can make a game that runs smoothly through a mobile browser (whilst staying true to MelonJS' API)? Granted I should myself do a benchmark, but if the one of the devs drop in and say that there should be no problem in it, then that's more conclusive and undeniably easier than doing a benchmark. :D

As an aside, if it is possible, are there things I should take note of (like size tricks and stuff)?

Jay Oster

unread,
May 16, 2013, 7:00:25 PM5/16/13
to mel...@googlegroups.com
The Debug Panel plugin is pretty useful for spotting possible performance problems. You can find it in the melonJS source distribution: https://github.com/melonjs/melonJS/blob/master/plugins/debug/debugPanel.js It's also included with the new boilerplate: https://github.com/melonjs/boilerplate

There are a lot of helpful tips for performance optimizations in the FAQ: https://github.com/melonjs/melonJS/wiki/Frequently-Asked-Questions

Also you should use TexturePacker to squash all sprite frames into a single image. Disable rotation or you could run into some performance issues as the engine has to "unrotate" every sprite on every frame. Using TexturePacker will solve a lot of performance issues caused by memory issues, and on some devices, feeding images to the GPU will be much faster.

Finally, use the entity pool to prevent slowdowns caused by garbage collection. (This is also an item in the FAQ.)

melonJS

unread,
May 16, 2013, 9:11:47 PM5/16/13
to mel...@googlegroups.com

See as well this very interesting article, that is anyway applicable to any engine out-there :
http://blogs.msdn.com/b/davrous/archive/2013/04/26/html5-gaming-benchmarking-sprites-animations-on-your-targeted-devices-amp-browsers.aspx

Then if you want to see an example of a games running smoothly on mobile using the stock browser (to get a reference), the first ones I'm thinking about are the following :
Sprung fever : http://blog.kodewerx.org/2013/05/1gam-april-postmortem.html
Beyond the horizon : http://jamiegault.com/Beyond/

They run just fine on modern/recent platformrs (ipad2 in my case), but for sure that all depends of what devices your are targeting.

Then you still have the choice to use a wrapper (cocoonjs) that will deliver almost native-like performances, enable full audio support , and will also allow you to deploy your games through the various store.

Reply all
Reply to author
Forward
0 new messages