Pong

While there are many interactive AJAX apps, this is a realtime one. The server acts as a pass-through layer to allow the two players to communicate. Each player regularly polls the server. New data is given to the server each poll cycle and the other player's data is picked up. This works fairly well, even on slow connections. However, there are synchronization issues when the two player's pings are very different (even if they are both fast).

To play, find a partner. The person to click 'start' will be player 2. When the next person (player 1) clicks 'start' the game will begin. No score is kept (currently). The game will timeout after 60 seconds without keyboard input; the server will timeout after 10 seconds without receiving an update from a player.

NOTE: this web app requires that http keep-alive works. If you are behind a proxy that blocks keep-alives, a new connection is made for each request. There is a max number of connections; if it is hit, the game will stop working (along with my webserver).

AJAX pong