Html5 performance

Monkey Forums/Monkey Beginners/Html5 performance

Moerin(Posted 2014) [#1]
Hi guys,

I'm currently working on a game project in html5.

Once my project compiled, i have tried it on numerous browsers (Chrome, Firefox, Internet Explorer), and everything worked fine until i set the variable RESIZEABLE_CANVAS, in my main.js to true. There is no change for Firefox and IE (60 FPS for each of them) but for chrome the framerate drop under 15 fps.

And furthermore, to manage the sound effect for the differents browsers, i use Howlser.js
http://goldfirestudios.com/blog/104/howler.js-Modern-Web-Audio-Javascript-Library,
which in contrary, works fine with Chrome and IE but is laggy with Firefox.

Do you have some advices to share?


Aman(Posted 2014) [#2]
Does the framerate stay under 15 fps after you stop resizing the canvas?

You don't need Howlser.js to manage sound effects for different browsers. You could do with monkey. Here is an example of that: http://monkeycoder.co.nz/bananas/mak/audiotest/audiotest.monkey


MikeHart(Posted 2014) [#3]
I think he is using Howler to achieve sound playback in mobile devices, or?


Moerin(Posted 2014) [#4]
@Aman

When i Set RESIZEABLE_CANVAS= false, my game performances return to normal, on each browser. Even the sound in firefox is better.

@MikeHart

Yes, it's the reason why i use howler.