• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Game won't run in Firefox

B

Ben_Saint

Guest
So I recently completed a game for my website and uploaded it only to find that while it works perfectly in Chrome, it won't run in Firefox. This happens even if I set the target device to Firefox when building the game files. I thought at first that the iframe the game is placed in just wasn't showing, but it must be showing because you do see the loading bar when the page opens, but then when the game should start it's just a blank black screen. Anyone have any clue what the problem could be? I don't even know how to start fixing this issue.

Here's a link to the page the game's currently on: http://saintcomix.com/c000.html

Thanks for reading, let me know if you've got any ideas.
 

Mike

nobody important
GMC Elder
Sounds like Firefox has changed something. Can you file a bug and include the project, and I'll take a look see what they've broken now :)

EDIT: Actually... looks like Chrome and IE has a fix for this issue, but not FF. I'll add that in as well...
 
Last edited:
B

Ben_Saint

Guest
Hi, thanks for the response, sorry though I'm new to these forums. Can you direct me to where to file the report and how to include the project with it?
 

Mike

nobody important
GMC Elder
Don't worry, I managed to find the issue... not sure when the fix will make it out. It's the Audio (WebAudio) that FF has a problem with.
 
B

Ben_Saint

Guest
Is there any kind of workaround for it? Like would changing the audio settings have any effect?
 

Mike

nobody important
GMC Elder
There's a "hack" you could do to the final script. It's crashing due to .cloneNode() not working. Above this line it you'll find....

if ((_cT == _Hg2) || (_cT == _dT)) {

You can change it to this...

if ((_cT == _Hg2) || (_cT == _dT) || (_cT==2) ) {

And that should allow it to run. If you rebuild, you can search for .cloneNode( again and fit it up again.
 

chmod777

Member
I don't know what this cloneNode is supposed to do but I have faced a similar weird problem in a old project.
Actually, the issue occurred when a sound has the same name than a JavaScript property!

So, if you try to name a sound "toString", then launch the game with Microsoft Edge, I'm pretty sure you will get the same issue.
 

True Valhalla

Full-Time Developer
GMC Elder
Is this only an issue with GMS 2? My 1.4 games are still working in the latest version of Firefox.
 

Mike

nobody important
GMC Elder
Not sure.... Didn't look into it that far, just saw FF was crashing on it, and noticed there were checks around it for Chrome and IE.....
 
B

Ben_Saint

Guest
Wow Mike, you're a lifesaver. When i finally found the spot to insert the code you gave me, it worked like a charm. The game linked in the OP now seems to be working fine on both Chrome and Firefox. Thanks!
 

Filipp_BSG

Member
Maybe some off-topic, but the last version of Firefox have a lot of issues when working with HTML5/canvas. Most HTML5 games have noticeable (up to 0.5 sec) tearings about every 10-15 seconds.
 
Top