• 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!

Export as HTML5 problem

B

Blan

Guest
Hi,
I recently released my game (SubStishooter) on Android and Pc.
Obviously the PC is what I am using to make the game so it works fine on that, and I had only minor modifications to enable it to work on Android devices(asynchronous input for your name, virtual keys and GUI settings for the virtual keys)
I have tried to export as a HTML5 from the PC version and also from the Android version, with not much success.
I uploaded the HTML5 files to a website (not a blog) I can use for testing, so it is not on my Pc.

It loads the intro screen graphics ok but no sounds.
Next is the menu screen and I hear the music playing.
When I click on Start the input window appears to enter your name (from Android version this happens, but the Pc version has no visible input text).
The next screen should now show the graphical play path of the game, but it does not and that is as far as it goes.
The backspace button does not bring up the pause menu.
I have not tested any other menu parts of the game so far.

Can anyone shed some light on what gamemaker commands etc do or do not work on HTML5 and point me in the right direction to enable me to modify my game for HTML5.

Thanks
 

Llama_Code

Member
That's pretty broad, without knowing anything at all about your game it would be hard to tell you where to begin.

Are you testing with Chrome?

One simple starting point is to clear the asset compiler cache before compiling your HTML5 version, (the little broom icon across the top) I have more issues with that on HTML5 than any other export.

Also, sometimes the legacy sound system works better with HTML5

Beyond that, in the room it breaks, step through that and see if your using anything that might break it.
 
B

Blan

Guest
Initially I was testing it with Firefox and since reading your reply I have also tested it with Chrome too.
Both have the same problem as described above.
I did read about clearing the asset compiler cache before compiling to HTML5 so I was sure to do that first.
Your suggestion about using the legacy sound system is something I will surely be trying.
The room in which the game halts does have coding for a pause button (back button on a mobile device), which could be the cause of the problem as this button is not part of the web browser window.
I will probably remove/disable all sounds and remove the pause button for now and test again.
Thanks for your help.
 
R

renex

Guest
Run in debug mode and then look at the browser console (f12 on chrome).

Game code will be unobfuscated so you can see where it fails.
 
S

seanm

Guest
Well safari and ie are pretty trash at running html5 games. Avoid those and update your browsers, chrome or firefox are fine.
After that everything should be working.
The only things you really need to avoid on html5 are: drawing fonts, surfaces, image_blend, and blend modes.
Though you can usually use most of that on html5 desktop no problem.
 

Ralucipe

Member
It's really important to build for HTML5 from the start, and test often. Porting is a nightmare otherwise!
No truer words have been spoken. Porting even simple desktop games to HTML5 will result in an overwhelming number of sudden and inexplicable bugs and incompatibilities. I can't tell you how many times I've seen this phrase in various marketplace extensions or manual pages:
ANYTHING INTERESTING EVER said:
NOTE: This is not available for HTML5!
 
Top