Can someone explain this issue I have an issue with HTML5 games.
I don't know much about WebGL etc, but I do know that JavaScript is used to direct the game.
So to that end, considering JavaScript cannot be compiled and then sent to the browser to render, anyone can view the source. Anyone can hack it up. How do you solve this?
Once you obfuscate the JavaScript code, its actually a similar situation to that with Java or even regular C++ programs to a lesser extent, because you can still 'hack it up'. Look at all of the mods for Minecraft, for example.
What? Take a look at Google Closure Compiler - it renames all identifiers to nonsense, making it impossible to work with, and not affecting performance at all.
Clients can be hacked anyways, whether compiled or not. This has always been true. The only way to make a game secure is to keep all the game logic and data server-side. This means clients only act as dumb terminals: they provide input to the servers, and render the output.
I don't know much about WebGL etc, but I do know that JavaScript is used to direct the game.
So to that end, considering JavaScript cannot be compiled and then sent to the browser to render, anyone can view the source. Anyone can hack it up. How do you solve this?