Scrolling Game Development Kit Forum

General => Game Development Artistry => Topic started by: media on 2016-03-20, 05:16:22 PM

Title: DRM
Post by: media on 2016-03-20, 05:16:22 PM
Hi.

I'm not sure if this belongs here, but how useful would it be if SGDK2 games had some kind of protection against unwanted distribution?

Since SGDK2 games are HTML5 based, you could generate a unique copy of the game for each user who loaded it.

Perhaps one could encrypt the game, and hide the data within a digital image of a person's own logo and rights ownership statement, using the JPEG compression algorithm. Additionally the hidden information could be encrypted again with some kind of chaotic map.

When the game is to be loaded, a JavaScript file collects the pixels of the image, and decodes the information into the code needed to run the game which is loaded into a buffer, and finally runs it with eval(); or new function();

This was used by Samil Shah: http://stegosploit.info/

The main idea is to load as little data as needed, pieces at a time. Really, so only load graphics once needed, and maps once needed, and only load them partially, etc. Additional security would be found by converting SGDK2 graphics to JPEG images and hiding information about the user whose copy this game belongs to within those.

This would help immensely in tracking down traitors.

Additionally, the domain of which the code is currently running under can be used as the key for decrypting the code from the image. This would make it difficult for the code from running under any other domain than yours. The idea is to avoid using "boolean" values at all because someone can just set these to true in the JavaScript event logger and bypass your security scheme.

By coupling your graphics and code you not only make it difficult for your game to be illegally modified, but you make it far more difficult for your code to be understood. By exploiting metadata that can be hidden in JPEG's DCT Transform, you can track who is distributing your game.
Title: Re: DRM
Post by: bluemonkmn on 2016-03-21, 07:11:09 AM
I've spent time in the past trying to protect my software but in the end it's all for naught because the software is never popular enough to warrant protection anyway. And upon further reflection about what really matters, these sorts of protections basically work against everything I try to accomplish, so I've given up on them. Maybe I'm still naive, but I think you gotta be lucky to have someone interested enough in your work for it to warrant protection, and then it might be worth some effort. But until then, I think it's rarely worth the effort. Until then, we should be doing everything we can to spread and share interest in our work rather than restrict it. See http://iotabuildit.sf.net/ as an example.

Now it's possible that, lacking an element of mystery (see Apple, Inc.), software is *less* interesting, but I don't know enough about marketing to speak on that subject.