Basically, the title says it all. I've seen and worked with Django, Rails and a bit with Cake PHP. I'd like to know if there is a framework that is excellent for supporting casual, 2d, browser based game development. The closest that I've seen is flash, but I'd like to find something open source. Something that could handle both the graphics and communication to a database would be ideal. Any suggestions?

  • \$\begingroup\$ Are you talking about 2d games such as the typical flash game (client based) or web games such as tribal wars etc...? \$\endgroup\$ – Zaky German Apr 28 '11 at 15:34
  • \$\begingroup\$ Primarily 2d. I want to use them here for work(animated charts and such), and I have a few open source concepts for home. \$\endgroup\$ – Albert Perrien II Apr 28 '11 at 20:24

I maintain a list of resources related to javascript game development that i have found useful, including a list of game engines and web services you can integrate.

You need to keep track of two different concepts: Client side presentation and server side processing. If you are developing a casual flash-style game the complete game will probably be the client side presentation, mixed with some web services for highscore and the likes. However, if you want to do social-, mulitplayer- or mmo style games a lot, if not most of the game will be on the server to prevent cheating, and the client will just act like a dumb terminal. How that is handled is probably a topic for another question.

Of interest to anyone who wants to communicate in realtime between browser and server should be socket.io that is an abstraction on top of websockets with fallback using flash in older browsers.

  • \$\begingroup\$ Wow, these are really good. I'll look them over tonight! \$\endgroup\$ – Albert Perrien II Apr 28 '11 at 20:23

There are several game engines/frameworks emerging with HTML5. Here are some links that might be of interest:

Apart from the Rocket Engine, these engines just cover the client side of a game. So there's no direct communication to a database (unless you're using something like Google Gears).

Depending on your game, you still have to implement some backend stuff in Ruby, Java, PHP, ASP or similar. IMHO any regular web-application framework will be sufficient for that. Node.js probably deserves a special mention, because you can implement the backend in the same language as your game (JavaScript).


The thing is, in web development, a large part of the presentation would typically be done on the server side (using a framework that embeds some sort of templating system to output HTML to the client). If you want to do interactive game, a lot of the work has to happen on the client side (in the browser), so the problem is not so much how you generate HTML, but rather how you make things move on the user's screen.

For this client-side part, as mentioned, your choice are either Flash or JS (potentially using Canvas for modern browser).

For the client-server-db communication part, any of the technology you mentioned would be fine. The browser and server can communicate using classic ajax calls if you need.

I don't know of a framework that would handle both problems, but that's probably because they are really distinct, and happening on different side of the client-server mix.


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