Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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:

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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