How do I create a site lock security layer to my game?

0 favourites
  • 9 posts
From the Asset Store
A set of vector game assets contains ground tiles and several objects, used for creating platformer games
  • Ashley and community:

    Is it possible to use the browser object to create a site-lock security layer to our games?. I would like to add this to my game as an added security measure before submitting for sponsorship or game portals. If it can't be done through the editor, does some one have a sample script to get me started?

    Thank you in advanced, this feature will be a helpful way to further prevent misuse of hosted game files meant to be hosted only on certain sites...

  • Just check the domain from the Browser object. The check can be removed by modifying the JS code though, so it's not very secure.

  • Thanks Ashley,

    I was not able to find this within the browser object, can you point me to this specific action. Regarding your advice, I do agree even if its not foolproof, is still another layer of security added.

    Many thanks.

  • Animate

    There isn't a specific condition for this in the Browser object, but Browser.Domain is a value that you can compare.

    For example,

    To check a game is running from DropBox, do this:

    System->Compare two values->Browser.Domain = "dl.dropboxusercontent.com"

    You can output Browser.Domain to a Text or SpriteFont object to confirm what the domain is for your website.

  • OddConfection

    Thank you for the assistance. Will follow the steps suggested.

    Thanks...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just check the domain from the Browser object. The check can be removed by modifying the JS code though, so it's not very secure.

    I think you can hide it in the JS code by creating the value to be compared using more variables and concatenate the values.

    instead of comparing Browser.domain with ""www.scirra.com" it can be done like this:

    var a = ww

    var b = w.sci

    var c = r

    var d = ra.c

    var e = om

    and compare Browser.domain = a & b & c & d & e

    Searching for http://www.scirra.com in the JS file will result in no findings

  • I hate to bump this thread, but I'm also curious about this. I assume JS = Javascript.

    stasuss -

    " there is another way to secure the valid url - request it from the server via ajax. but this is not a total security, because response could be spoofed..

    and there are some more. we can put our code into the png image.

    [can't post links. lol. google for "script to png"]

    but this way requires to implements a js-coded unpacker for this png image"

    Does anyone know about this? 90% of google searches just show photoshop batch run files converting layers to PNG.

    I'm assuming this "script to PNG" takes your code, and turns it into an image that cannot be modified as easily by malicious users?

    Its easy for people to people to steal your assets and such, but can they also take the code you used to create the game (Since you're using the C2 engine I mean)

    Are there more (as in, if anyone would be so kind as to link) advanced ways or tutorials or, maybe a "Not so simple way" of protecting your games after publishing?

  • The most secure way is to host your own servers and self-publish.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)