views:

204

answers:

2

I'm making a simple web-based, turn-based game and am trying to determine what modules exist out there to help me on this task.

Here's the web app I'm looking to build:

  • User visits the homepage, clicks on a "play game" link
  • This takes the user to a "game room" where he either joins someone else who has been waiting for a partner to play with or waits for someone to join him
  • As soon as there are two users in the room, the game starts. It's a very simple turn-based textual game. One user enters a number, then the other user responds by entering another number, and so on, until some conditions are met and the game is over; each player is shown their final score.

My default plan has been to do this using Django and AJAX. Are there any existing modules/frameworks out there that would potentially save me some of the work of writing this from scratch? (Note: I might be able to negotiate to have this done in .NET if there are some great .NET libraries.)

+1  A: 

Try the Jabber protocol ... It works great for IM, but was designed for use by other types of systems as well and there's already a set of bindings for Python since it has become so popular.

Steve Moyer
+1  A: 

If you're not going to have huge numbers of concurrent users or want it done quickly I would go for holding game state on the server and polling via Ajax.

The js library of your choice will make that polling easier.

If you want it to be larger and hairier, you might look at Strophe, a js library for writing XMPP clients -- it has a handful of example sites.

wombleton