I am building a browser game and I am trying to make it more fast.
Current situation:
game.php -> ajax request to map.php
response: getElementById('div_1') change className (400 times)
after that, it does again a request to map.php, and keeps repeating that.
I now get 2-3 requests per second, so that's 2-3 frames per second for the user.
Is it possible to make it faster?
(I already checked Comet / Websockets / NodeJs/ Long polling, but they can not improve more then 20% performance.)
If you want a link to the game to check it yourself, send me a private message.