Jump to content

Checking for browser events


Luis Felipe
 Share

Recommended Posts

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)

 

 

Link to comment
Share on other sites

"...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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...