satellite-game/Satellite — pull request #212 by stites (2014-01-27 08:26:55+00:00)
Title: Throttled network calls, action-based network calls, optimized position calculations

Throttled network calls by 80% when in max gameplay. This seems seamless, however it needs to be play tested across a network and not only on one box.

Positions are now sent to sockets by checking for a change in acceleration (rotational/linear). The thresholds were found through play testing and there is no noticeable difference when the network is not throttled. some changed may be required depending on above.

Syncing packets are sent once every 60 frames. I thought about putting this on the server-side, need to discuss more of this later.

Also, optimized the position function where all of this takes place. Primarily this was done by removing the delta function for raw calculations of acceleration which optimizes performance by 96%: http://jsperf.com/delta-function-or-raw-calculation