

Power Surge – optimize the JavaScript in this HTML5 game - coderitual
https://hacks.mozilla.org/2015/06/power-surge-optimize-the-javascript-in-this-html5-game-using-firefox-developer-edition/

======
yissachar
Very cool concept!

I spent a while tweaking the code to get more CPU cycles, but after a while
tired of mining the asteroids manually, so I just got rid of them:

    
    
      ENGINE.Game.spawnAsteroid = function () {}
    

After that the next logical step was to give myself more ships:

    
    
      SHIP_CPU_COST = 0.001;
    

Of course, it's a lot more interesting (and challenging!) to actually play by
the rules.

------
ashworth
This is the greatest developer tool game/demo I've ever seen. Great work guys

------
nallerooth
I'm going to spend way too much time on this.. Nice work Mozillians!

------
hayksaakian
I'm opposed to the split between developer version of Firefox and consumer
version

I've already encountered bugs that only exist in the consumer version that I
would never notice with the Dev version.

(In my case, sharing inbound and outbound event names for socket.io caused
some bizzare issues)

~~~
dbaupp
I was under the impression that the dev edition was essentially a rebranded
alpha channel? i.e. bugs may be fixed because the dev release is a few
versions ahead of the main one.

~~~
robin_reala
Exactly. The previous flow was Nightly → Aurora → Beta → Release; the new flow
is Nightly → Developer → Beta → Release. The only difference is that for the
Developer release they package a different theme. If you’re using Developer
you’re 12 weeks ahead of the release version.

------
hitlin37
looks good tool for debugging.

------
M8
I know how to beat it - Tao of Programming 8.2:

[http://www.mit.edu/~xela/tao.html](http://www.mit.edu/~xela/tao.html)

 _" A Master Programmer passed a novice programmer one day.

The Master noted the novice's preoccupation with a hand-held computer game.

"Excuse me," he said, "may I examine it?"

The novice bolted to attention and handed the device to the Master. "I see
that the device claims to have three levels of play: Easy, Medium, and Hard,"
said the Master. "Yet every such device has another level of play, where the
device seeks not to conquer the human, nor to be conquered by the human."

"Pray, Great Master," implored the novice, "how does one find this mysterious
setting?"

The Master dropped the device to the ground and crushed it with his heel.
Suddenly the novice was enlightened."_

To beat Mozilla at their game, just go native! (supports many languages
without transpilation as a plus)

