• 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 HTML5 export

shahin54

Member
Some of the programs work properly, but one of them plays the default sound after clicking the play button, but does not go to the next page.
 

TheWaffle

Member
Funny.....
HTML ports are complicated ....
your syntax must be PERFECT and comply with JAVASCRIPT not GML ....
GML will let you get away with not using ; after a line,
GML will let you get away with skipping variable definitions ....
GML will let you reference objects and/or globals before they are defined ....
GML will use a system font if you have not defined one ....

violate any of these and HTML ports may crash at random times ...
Sometimes, to find the error, you need to comment out 3/4 of your game just to see if anything works ...
That is why the correct answer to your question is "Nope"...
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
your syntax must be PERFECT and comply with JAVASCRIPT not GML ....
GML will let you get away with not using ; after a line,
These are popular misconceptions, your GML converted to AST and then to JS so result is the same - if you run the game in Debug mode, you can inspect that generated JS and see that semicolons (which, should we mention, aren't obligatory in JS either) are added automatically.
GML will let you get away with skipping variable definitions ....
GML will let you reference objects and/or globals before they are defined ....
This depends on what you mean in particular but likely false.
GML will use a system font if you have not defined one ....
On native platforms, GM will use a default font embedded into runner itself if none is defined. HTML5 export warns you in the console about when trying to use a nonexistent font.

violate any of these and HTML ports may crash at random times ...
Sometimes, to find the error, you need to comment out 3/4 of your game just to see if anything works ...
Usually you would use debug mode and JavaScript debugger (in developer tools) to see why your game is crashing instead of commenting the code out and preying that it'll help
 

TheWaffle

Member
In short, YellowAfterLife does not know either ... Use of the JS debugger is a rather advanced subject for new users ... I'm using GM1.4 (or before) which the JS export sometimes just does not work. I switch between 1.4.1757 (exports great, debug sucks) and 1.4.9999 (for debugging, export sucks)
 
Top