Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm just doing a bit of research into tech to use for a mobile multi-player game.

It's more an experiment at present so for the moment, the only thing that Players need to be aware of is the other Players.

If this was a typical web application and not a game It'd just have HTTP requests firing all the time -- but since this is a game, performance and accuracy is going to be a problem.

Due to the game being targeted at multiple phone platforms, lets say that the client will be written in JavaScript or a framework based on JavaScript. The server technology is totally open.

Each player will need to make the equivalent of a HTTP post and get only using a faster protocol. The reason for multiplayer being web based is because multiplayer across Bluetooth or other local networking would be too diverse across the platforms and could cause problems.

So the question boils down to whats a good protocol/technology to use for JavaScript multiplayer? Any advice on the server side stuff or does it matter? Any reason I should drop this two-tier architecture and go with direct phone-to-phone connection?

share|improve this question
up vote 13 down vote accepted

You want a better communication protocol then HTTP. You probably want UDP or TCP. Browsers have no way of doing UDP communication so your only choice is TCP.

For TCP you would want to use a WebSocket, however browser support is unstable on websockets.

This means you would need to use a COMET technique to emulate TCP, one popular emulation would be a websocket embedded in a flash application.

Socket.IO is a library (for node.js) that supports websockets and emulates them with an appropiate fallback on non compliant web browsers (it uses flash and other COMET techniques).

For multiplayer JavaScript games I would recommend the usage of and node.js

share|improve this answer
Here's a sample of a real-time game made with HTML5 & WebSockets: The source code is available here: – Elisée Oct 10 '11 at 13:45
Here are two more examples – Raynos Oct 10 '11 at 13:56

Check this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.