I am working on an HTML5 multiplayer game that uses jQuery to query the server for the state of the game. I am currently requesting a server with a .ajax call every 2000 ms to impress real-time updates. I really don't push too much data through ... basically just the x / y position and a few character attributes ... with only a few players living in my game instance.
The server itself is a shared hosting server, and I would like to try to keep my processors as low as possible when I develop this game (and move it to something more powerful in the future).
Here is my current server polling method for data. Any suggestions are welcome, as server loading is a new area for me.
$.ajax({ type:'GET', url:"controller.php?a=player-info", dataType:'json', success: function(data){
One thing I should mention is that since this is on a shared server, I don't have free processes to open connections (e.g. Node.js).
source share