dominicwong617/asteroids — pull request #2 by wwc278 (2013-07-20 06:28:27+00:00)
Title: fix bullets slowing down game and turning

Hey Dominic, it seems that the problems of the bullets and turning were caused by how we triggered the events. We bound the events to a key in update, and the problem is update is fired 60 times a sec (or more depending on the refresh rate). So we were firing hundreds of bullets per key press and we were turning hundreds of times per key press. I have switched over to the jquery method "keypress, keydown, and keyup". They seem to work better.

I have also changed some keys around. "W" is to move forward, "A" is to turn left, "D" is to turn right, "S" is to fire. The keys don't make for a good playing experience, however, so they should be changed.