• 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 Is it possible to turn off the obfuscator?

M

Mobie

Guest
Is there a way to turn off the obfuscator and compile a plain HTML5/JS game for a web developer I may hire to see?
 

chamaeleon

Member
Ok, thanks. Seems like that might be a valuable feature to have on occasion.
What do you think this hypothetical web developer need to see?
Edit: As an aside, the Javascript code representing your GMS code (so not the GMS runtime itself) is not obfuscated if you start running the game in debug mode from within GMS.
 

True Valhalla

Full-Time Developer
GMC Elder
Is there a way to turn off the obfuscator and compile a plain HTML5/JS game for a web developer I may hire to see?
Yes.

You can run the game in debug mode which disables most obfuscation then navigate to the temporary location of the compiled build (available in Preferences). Copy the unobfuscated source to a permanent location then search for debugMode = true in the JavaScript. Toggle it to false and you're all set.
 
M

Mobie

Guest
What do you think this hypothetical web developer need to see?
Edit: As an aside, the Javascript code representing your GMS code (so not the GMS runtime itself) is not obfuscated if you start running the game in debug mode from within GMS.
Yes.

You can run the game in debug mode which disables most obfuscation then navigate to the temporary location of the compiled build (available in Preferences). Copy the unobfuscated source to a permanent location then search for debugMode = true in the JavaScript. Toggle it to false and you're all set.
Debug mode, yes! Thank you chamaeleon and TV.
 

chamaeleon

Member
Debug mode, yes! Thank you chamaeleon and TV.
But again, I feel I must ask.. What do you think the web developer need to do? Do they really need to do anything inside the scope of the <div> block where the game will be placed and is handled by the Javascript output by GMS? Is your question related to making something look different in the game, or make it look different outside the boundary of the game?
 
M

Mobie

Guest
But again, I feel I must ask.. What do you think the web developer need to do? Do they really need to do anything inside the scope of the <div> block where the game will be placed and is handled by the Javascript output by GMS? Is your question related to making something look different in the game, or make it look different outside the boundary of the game?
I'm going to be needing some help with some web implementation that is outside of the scope of GMS2 and wayyyy outside the scope of my abilities. Namely a portal, access control and a payment system. Don't know what kind of questions might come up, but I wanted to find out if I could see the JS if need be. Beyond that, I don't know yet.
 

chamaeleon

Member
I'm going to be needing some help with some web implementation that is outside of the scope of GMS2 and wayyyy outside the scope of my abilities. Namely a portal, access control and a payment system. Don't know what kind of questions might come up, but I wanted to find out if I could see the JS if need be. Beyond that, I don't know yet.
Your hypothetical web developer will more than likely create HTML, Javascript, CSS, perhaps PHP backend code, etc. completely independently of your game and should only need to know what the index.html looks like in order to place a game on a web page (which comes down to the content of a div and canvas tag plus the loading of the game Javascript code). The game itself and the Javascript should be irrelevant to this developer who will create their own resources or use standard frameworks for the things you mention. From the web developers point of view it is not vastly different from saying, "place this jpeg on the page" in an agreed upon web page design. A competent web developer should not have any issues taking a glance at the GMS index.html and see what the basic requirements are for this process.
 
M

Mobie

Guest
Your hypothetical web developer will more than likely create HTML, Javascript, CSS, perhaps PHP backend code, etc. completely independently of your game and should only need to know what the index.html looks like in order to place a game on a web page (which comes down to the content of a div and canvas tag plus the loading of the game Javascript code). The game itself and the Javascript should be irrelevant to this developer who will create their own resources or use standard frameworks for the things you mention. From the web developers point of view it is not vastly different from saying, "place this jpeg on the page" in an agreed upon web page design. A competent web developer should not have any issues taking a glance at the GMS index.html and see what the basic requirements are for this process.
Great info, thanks much chamaeleon! The company I was looking at didn't work out, so I'm looking again.
 

Kaliam

Member
Your hypothetical web developer will more than likely create HTML, Javascript, CSS, perhaps PHP backend code, etc. completely independently of your game and should only need to know what the index.html looks like in order to place a game on a web page (which comes down to the content of a div and canvas tag plus the loading of the game Javascript code). The game itself and the Javascript should be irrelevant to this developer who will create their own resources or use standard frameworks for the things you mention. From the web developers point of view it is not vastly different from saying, "place this jpeg on the page" in an agreed upon web page design. A competent web developer should not have any issues taking a glance at the GMS index.html and see what the basic requirements are for this process.
Personally I need this feature so that I can debug my program. My game runs fine when compiling on the windows VM, but when I go into HTML5 certain things cause errors for reasons unknown. The console would be helpful but the code that errors out is obfuscated so the error message is basically useless. Because the bug in my code is specific to the HTML5 version, the debugger is useless to me because it only runs on native versions of the game.
 
Top