Luis Felipe Posted April 21, 2014 Share Posted April 21, 2014 I was wondering if it's possible to check for actual events a user might undertake in the browser such as: opening the Javascript Console on Chrome or checking to see if the original source code was changed? The objective would be to prevent potential people from cheating in general. I was thinking that if this were possible, the game could output a small message: "Please close the console window to continue the game, all game data will be lost in 5 seconds". It sounds a little harsh, yes, and certainly wouldn't prevent people from looking at the code, but couldn't this method at least discourage cheating/ban it if the developer really wanted to? (of course only if it's actually possible) Quote Link to comment Share on other sites More sharing options...
ragnarok Posted April 22, 2014 Share Posted April 22, 2014 This is from a few years ago, not sure if it will work today:http://stackoverflow.com/questions/21692646/how-does-facebook-disable-the-browsers-integrated-developer-tools Quote Link to comment Share on other sites More sharing options...
Luis Felipe Posted April 23, 2014 Author Share Posted April 23, 2014 great! thanks Quote Link to comment Share on other sites More sharing options...
ifritgames Posted April 23, 2014 Share Posted April 23, 2014 "...The objective would be to prevent potential people from cheating in general. ..." Even if you can stop people from opening and using the console, or changing your source code, while your application is running, html5/javascript are client side technologies. There is no way you can stop people from accessing your application/program code, as the browser has to download it in full every time it runs. So while it is a goal for all game(/web) developers to prevent cheating, I dont think the right path is trying to block the debugger console. Quote Link to comment Share on other sites More sharing options...
ultimatematchthree Posted May 16, 2014 Share Posted May 16, 2014 Even if you can stop people from opening and using the console, or changing your source code, while your application is running, html5/javascript are client side technologies. There is no way you can stop people from accessing your application/program code, as the browser has to download it in full every time it runs.ifritgames is right, you can never trust the client. If preventing cheating is a requirement for your game, consider having your game logic run from a remote server. Not a foolproof solution (e.g. a bot client driven by AI can talk to your server, etc.) but it's an added layer of protection. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.