I was playing a space arcade shooter https://moonbreakers.com/ and tried to see some of the JS and shader code. However, I was unable to find anything but some server communication code. Game code is thus probably run on servers, but the shaders should at least be local, right? And I have understood that even if the server runs the true game state, clients commonly do some physics interpolation etc by themselves.

My only guess is that the game gets the code with jQuery and it doesn't show in the page source. Can that code be looked at via a debugger?


The game you linked is written in C/C++ (Native Client), it's embedding the executable. As for JavaScript obfuscation, look into tools like the closure compiler, etc.


Seems weird to me too. Are you user is a WebGl app? Maybe they are using NaCl (Native code inside the Chrome brownser) https://developers.google.com/native-client/

Old answer (before the edit) Hum, I have no experience in Chrome games, but code obfuscation seems like the way to go. Take a look at this community answer in SO:


  • \$\begingroup\$ That is certainly one part of the equation, but it doesn't answer my question of how they have hidden even the obfuscated code. \$\endgroup\$ – DohnJoe May 9 '12 at 9:49
  • \$\begingroup\$ Sorry, I misunderstood you them, edited the answer with a possible explanation. \$\endgroup\$ – Ricky AH May 9 '12 at 10:17
  • \$\begingroup\$ mightyaction.com/2011/12/20/moon-breakers-chrome-browser says they are using NaCl, which explains it only working in Chrome. \$\endgroup\$ – Adam May 9 '12 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.