javascriptajaxwebsocketserver

What is the best technology to be used to make a server call per millisecond from JavaScript?


I have a situation where I am going to run a game on a web page. After every millisecond I will be updating the sprite position on the web page. The sprite position will be provided by server.

Please suggest the best possible ways.


Solution

  • The network connection from my router to the ISP gateway is currently 20ms so updating every ms is possibly not the best strategy.

    A somewhat reasonable frame rate is 60 frames / second. So if I were to try this I would probably try and send multiple co-ordinates at once. This assumes you know some of the co-ordinates some number of milliseconds a head of time.

    Perhaps providing a little more information about what you're trying to achieve may help.