1
\$\begingroup\$

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?

\$\endgroup\$
1
  • \$\begingroup\$ I’m voting to close this question because the requested game is no longer reachable. Rewording the question to make it "generic" would make it too broad. \$\endgroup\$
    – Vaillancourt
    Commented Nov 17, 2020 at 18:19

2 Answers 2

3
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

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:

https://stackoverflow.com/questions/194397/how-can-i-obfuscate-javascript

\$\endgroup\$
3
  • \$\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
    Commented May 9, 2012 at 9:49
  • \$\begingroup\$ Sorry, I misunderstood you them, edited the answer with a possible explanation. \$\endgroup\$
    – Ricky AH
    Commented May 9, 2012 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
    Commented May 9, 2012 at 13:01

Not the answer you're looking for? Browse other questions tagged .