Forum Moderators: open

Message Too Old, No Replies

Using AJAX for browser game, 3 frames per second

         

GameGame

12:42 pm on Aug 1, 2014 (gmt 0)

10+ Year Member



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.

penders

1:48 pm on Aug 4, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How long does your server take to respond and deal with the request?