Slight Stutter in HTML5?

Community Forums/Monkey Talk/Slight Stutter in HTML5?

Chroma(Posted 2011) [#1]
Every second or so the graphics in HTML5 will stutter. Is everyone getting this and does anyone know why?

Also, one thing I haven't figured out is how to change the width and height of graphics. Everything I make is 640x480...


GW(Posted 2011) [#2]
What browser?
Chrome and Firefox4 are fastest and will give the least stutter, But it will never completely go away.
HTML5 is not really suitable for gamedev.


MCP(Posted 2011) [#3]
According to the documentation you can't change the graphics width & height via Monkey. This must be tweaked in your target SDK!


Chroma(Posted 2011) [#4]
This must be tweaked in your target SDK!
Egads! How the $^&@ do I do that? (Looking in the docs...)

I'm using Chrome. I don't see any stutter in Zombie Trailer Park is why I ask.

Last edited 2011


therevills(Posted 2011) [#5]
Zombie Trailer Park is using Flash not HTML5.

How the $^&@ do I do that? (Looking in the docs...)


For HTML5, you need to alter the build HTML file Monkey generates for your game, it will be in your project/project.build/html5 folder called MonkeyGame.html.

Change this line:
<canvas id="GameCanvas" onclick="javascript:this.focus();" width=640 height=480 tabindex=1></canvas><br>


It would be good if Monkey could alter this for you...

Last edited 2011

Last edited 2011


Chroma(Posted 2011) [#6]
Any idea how to alter it for GLFW? If you have to change the code in the .c file and then recompile that using Express or GCC...that would stink.

But as Mark said, he wanted to get the Launch out of the way. So now hopefully we'll see the "ease of use" commands filter through.

Last edited 2011


therevills(Posted 2011) [#7]
Any idea how to alter it for GLFW?


Once youve build it the first time, Monkey generates all the c++ code for you... then go into the GLFW build folder and alter the config.h file, then rebuild via Monkey - after this you dont need to alter the config.h file again.

Again since Monkey is generating the c++ files, you would have thought it could alter the stub files too.

For example:
SetScreenSize 800, 600


So when compiling for HTML5, it would alter the MonkeyGame.html canas tag and alter the config.c file for GLFW...

Hopefully this will come later.

Last edited 2011


MGE(Posted 2011) [#8]
All html5 games run anywhere from good to choppy on every desktop / laptop I've thrown at it.


Chroma(Posted 2011) [#9]
Well it's only been a few days since release. I'm sure more graphics options are in the pipeline.

I'm VERY happy with my Monkey...


_Skully(Posted 2011) [#10]
Ive found HTML5 slower than Flash and also has these strange timing issues
but its great for prototyping (starts quickly)


Chroma(Posted 2011) [#11]
It's taking about 30 sec or longer to build anything in Monkey for either HTML5 or GLWF. No biggie, I'm sure it'll be resolved soon. BTW Skully...how long does it take you to build one of the small demo apps in HMTL5?