Hacker News new | past | comments | ask | show | jobs | submit login

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.


Not true. You can't really obfuscate JavaScript in a meaningful manner without making it slower.


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.


And that obfuscation is easily undone:

www.google.com/search?q=javascript+deobfuscator


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.


Any network system that relies on the integrity of the client to maintain security is fundementally broken.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: