How do I distribute HTML5 game and protect assets?

Get help using Construct 2

Post » Wed Jun 15, 2016 1:10 am

In the past I distributed my Flash games to websites and didn't worry too much about security. But with HTML5 it seems it would be very easy for anyone to remove or change any logos, links, etc. So what is the protection model being used to distribute Construct 2 HTML5 games? Specifically I'd like to know a way to distribute the game without someone being able to easily replace the logo in the images folder or remove the "More Games" button and link.
B
11
S
3
Posts: 19
Reputation: 763

Post » Wed Jun 15, 2016 8:13 am

How are you distributing a HTML5 game?

Most HTML5 games are uploaded to a web server - so nothing can be modified by anyone unless they have direct access to your hosting (or they hack into it).
I'm not sure I fully understand what you're asking :/

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Wed Jun 15, 2016 11:46 am

Distribution would be by email or by download. I currently get emails about HTML5 games I can download for my site. I haven't verified it but I assume they have some protection to keep people from easily changing the assets.

In the past I've distributed my games via flashgamedistribution.com and also by making games available via downloads from my sites. Again, I'm not looking for any heavy-duty copy protection just something to make it not quite so easy to replace/remove certain images.

Thanks!
B
11
S
3
Posts: 19
Reputation: 763

Post » Wed Jun 15, 2016 11:57 am

I don't think there's any way to fully protect assets in the game... but you could easily watermark your games with embedded identifiers - like using a sprite font to say "game made by XYZ", then use the same sprite font to display text in the rest of your game (so if someone were to edit it, it won't make any sense when used elsewhere).

I know there are hashing algorithms available too, but that's mainly to protect data tables and save-games. I'm not certain anything exists to protect image sheets (since C2 creates sheets from all sprite artwork on export).

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Wed Jun 15, 2016 12:26 pm

Using text as you described would be a good solution for what I'm trying to do. Thanks!
B
11
S
3
Posts: 19
Reputation: 763

Post » Wed Jun 15, 2016 12:57 pm

Keep in mind you would need to (probably) use a sprite font, and not just a normal text object... I guess anything is hackable if someone wants to try hard enough, but I suspect the sprite font object would be more difficult to modify if someone tried to pick through the compiled javascript.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Wed Jun 15, 2016 1:02 pm

You can check that the game is running on the correct domain.
That coupled with minification is a pretty good defense.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Wed Jun 15, 2016 11:42 pm

I do the domain check for games I want to only run on my sites but with distribution anyone can download it and install it on their website. I don't really worry about someone who wants to hack it as you really can't prevent that if someone really wants it. That said, it is too easy to change out logos and branding with them just sitting in the images directory.
B
11
S
3
Posts: 19
Reputation: 763


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests