question about html5

Discussion and feedback on Construct 2

Post » Fri Mar 04, 2011 4:09 pm

This is probably a newb question as far as web dev goes, but will there be any way to embed these games iinto a page so we can hide the html5 and keep control of it? Or will all games on the web made with html5 be open source just by rightclicking and clicking "view source"
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Mar 04, 2011 4:15 pm

Any HTML/CSS/JS a user downloads and runs online will have it's source fully viewable. There are no ways around this, and don't believe anyone that tells you otherwise. Also, don't disable right clicking on pages, etc etc, it's all incredibly weak protection that annoys people more than serves it's purpose!

However, you can obfuscate the code, and run it through a compiler (for example Google's closure compiler: http://closure-compiler.appspot.com/home) and this makes it extremely hard, and requiring a lot of skill to make sense of your code.

Obfuscation I believe is a feature that will be added to the export process as an option when Construct 2 gets more mature.
Image Image
Scirra Founder
B
125
S
37
G
25
Posts: 3,945
Reputation: 44,922

Post » Fri Mar 04, 2011 4:17 pm

You can at the moment manually put all exported JS through an obfuscator or the google compiler then server that, but I think there are some bugs (in regards to closure compiler) that need to be sorted out. But try running it through an obfuscator, there are lots out there.
Image Image
Scirra Founder
B
125
S
37
G
25
Posts: 3,945
Reputation: 44,922

Post » Fri Mar 04, 2011 5:02 pm

Construct's code doesn't survive 'advanced optimisations' in the closure compiler, only 'simple optimisations' which has much less of an obfuscating effect. It might be something we can fix though, it's on my todo list to figure out at some point (but it's low priority right now since it doesn't actually affect any functionality).
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Mar 04, 2011 11:56 pm

ok thank you.
I can definitely see why all the fuss about exe support even more so now.
when c2 was still a glimmer in your eye, there was a survey about 'which 2 platforms' wasn't there?
just curious, if exe is a definite planned feature? and would it more likely be after c2 is total and complete html5 working, or at a certain point will the second platform be added and progress along with html5 toward the initial fully functional version
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461


Return to Construct 2 General

Who is online

Users browsing this forum: Google [Bot], Unconnected and 1 guest