Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simplest way to implement backend server for multiplayer JavaScript game? (COMET/longpolling)

I've been writing a game in JavaScript, and it's time to make it multiplayer. I would like to use AJAX long-polling to get the current game state, as well as implement the lobby.

The server just needs to perform basic functions, like store the gamestate in the mysql database, retrieve the gamestate, and format the scoreboard.

I think that writing it in PHP would be easiest, but that would be a bad idea due to the number of apache processes it would spawn.

What do you recommend? I'm looking for the most straightforward approach.

Edit: StreamHub seems good, but the community edition only allows for 10 concurrent users.

like image 610
Zack Burt Avatar asked Aug 02 '09 21:08

Zack Burt


1 Answers

I think http://nitrogenproject.com/ have a good comet example here http://nitrogenproject.com/web/samples/comet2

like image 96
Fu. Avatar answered Nov 09 '22 16:11

Fu.