Jump to content

Protect your phaser code

Recommended Posts

Hello friends.

I've a security question.

I've done two mini-games for my company. I really enjoyed the chance of using Phaser in my work and not for fun, as I usally do. My boss liked it too, so good news.

But he is concern because everybody are able to see the code with the elements inspector. My question is if there's some easy way to hide or protect the code from visitors, in order to avoid that our competititors steal the code for their own pages.

Any advice?

Thanks a lot!

Link to post
Share on other sites

Best you can do is to uglify the code using something like Google Closure Compiler Service.

To be fair, if competitors really wants to steal your stuff, it doesn't matter what language you use, they will always be able to get the source-code, even if you obscure variable-names and remove comments etc.


Use copyright and go the legal way instead of making the code unavailable.

Link to post
Share on other sites

I can add on to this: No, there's not. There are "code uglifiers" out there that will do more than minify they will actively warp your code to make it harder to reverse engineer... but, like JakeCake said, if someone wants to steal your stuff they're going to steal your stuff. The code, the assets, all of it.

Link to post
Share on other sites

If you are worried about it one potential solution is to have a requirement on a service under your control, your game could ping that service periodically (and at start up obviously, and it should be transparent from the user) and expect a certain response, given that you control both the legitimate game code that you're serving and the service you could even change that authentication procedure with no hit to the legitimate users.

Of course, this solution isn't 100% either but its another step that makes life harder for the less scrupulous among us and it really isn't too difficult to set up.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...