• 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 [SOLVED] Newest update (1.4.1788) breaks HTML5 runner when using custom index.html (workaround!)

P

ParodyKnaveBob

Guest
Howdy, all,

Before I go through the hassle of manually commenting out each line and/or filing a report to YYG and all that, I wanted to see if anyone else had this issue -- although I suspect it'd already be posted if so. $:^ \

Yesterday, I could run a project in Windows and HTML5 just fine. (In fact, I'd just tracked down an H5-specific bug where the IDE was compiling for it differently and breaking my code.) Today, without changing anything else, I merely updated the IDE (from 1.4.1773 to 1.4.1788) then hit the usual sanity check runs on Win and H5. It's fine on the former. It's the notorious empty black browser page (with no debug pop-up) on the latter -- and no browser console errors to boot.

Regards,
Bob
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Apparently there had been some accidentally breaking changes recently - default index.html template was updated to include
Code:
<script>window.onload = GameMaker_Init;</script>
to allow delayed game start (something that people had been asking for), but this means that if you are using a custom index.html, you'll need to add that new line to your template manually. Needless to say, that's not very backwards-compatible and will get fixed in subsequent beta.
 
P

ParodyKnaveBob

Guest
Got it. Works fine, now. Thank you, YAL!

Fwiw, alternatively, one can save
Code:
window.onload=GameMaker_Init;
in the GGS HTML5 tab's "Prepend output .js with" field. It's probably simpler that way for most set-ups. (And fwiw, I prefer the whitespace you typed, but deleted it just to match the following minified code, ha ha ha.)

Perhaps you could get the folks in the tower to add this pretty vital bit of info to the Release Notes? That kind of hotfix should be simple enough, eh?

Bob
 
P

ParodyKnaveBob

Guest
CORRECTION:

Prepending JS from GGS only works in a regular run. Debug mode with a custom index.html still goes into a black screen unless inserting YAL's quoted code into the HTML file instead.

Meanwhile, this is moot for me anyway since "there had been some accidentally breaking changes recently" like YAL also said. Texture drawing coordinates now get all messed up (but fine on Windows) in some cases:

Initial load:
upload_2018-2-16_21-16-50.png

After ingesting a log (which then allows some text and another button to be drawn on the screen):
upload_2018-2-16_21-24-3.png

Fortunately, this is a non-monetized app still deep in alpha, or I might be a lot more disappointed. $E^ b
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Meanwhile, this is moot for me anyway since "there had been some accidentally breaking changes recently" like YAL also said. Texture drawing coordinates now get all messed up (but fine on Windows) in some cases:
If clearing cache (brush button on toolbar) doesn't help, consider filing a bug with a sample attached (ideally remove assets that don't affect the issue from the project)
 
P

ParodyKnaveBob

Guest
If clearing cache (brush button on toolbar) doesn't help, consider filing a bug with a sample attached (ideally remove assets that don't affect the issue from the project)
Thank you. I was afraid of that, heheh. (I'd hoped this was something also known already, especially since I didn't find anything about the black screen / custom index.html on Mantis before posting.) Yeah, definitely tried clearing the asset cache. I'll see if I can't fire up MSIE and send a bug report in a couple/few days when I can make some time.

Bob
 

Overloaded

The Oneirophobe
I'm not using a custom index.html, yet when I run my game in HTML5 the browser tab is just black and non-responsive. It used to work just fine before the update, and it works fine with Windows & Android. The browser's console is empty, too.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
I'm not using a custom index.html, yet when I run my game in HTML5 the browser tab is just black and non-responsive. It used to work just fine before the update, and it works fine with Windows & Android. The browser's console is empty, too.
if doing GameMaker_Init() in console doesn't help anything, please file a bug with project file attached.
 
Top