Sunday, May 17, 2009

My summer project: let the games begin

I finally got my Schluesselmeister app to a point where I feel comfortable moving away from my desktop app and into the cloud (the final missing piece was sharing, so that my wife and I could use the same key database). Now that that's done, I need another hobby project :-) The search criteria were as following
  • It should be as far away from my day job as it could possibly be, yet still involve Google App Engine.
  • It should force me to look at the tools from a different angle and broaden my perspective.
  • It should be about something I can "occasionally" mention in this blog and that people will hopefully enjoy reading.
  • It should be something that I find fun to do.
At first, I thought along the lines of building an enterprise application. Ages ago (at least in software years ;-), when I was at a previous job writing software for public transportation, I had claimed that:
Even if Google happens to stay out of the market, its products will help lower the entry-level for this industry even more. By using its products, a new breed of systems, based on Internet technologies and open standards will reach the market. Greater competition will improve the overall quality of the solutions offered, and the end user is going to benefit.
I was briefly contemplating putting that statement to the test and writing such an application. After all, App Engine seemed like the perfect backend of moving such software into the cloud. The problem with it: it seemed more like work than fun. Also, I wasn't sure if I could squeeze any good articles out of such a project ;-)

After some more soul searching, I decided to focus on something else instead: online gaming. A recent lightning talk I saw on Buddypoke inspired me: obviously, App Engine is a great backend to scale fun applications to millions of users. But how? What works, and what doesn't? What are best practices to build such a fun and massively scalable application?

Naturally, I did not want to reinvent the wheel. I searched a little bit around and found JOGRE, a Java-based gaming engine that is open source, seems to have decent test coverage and comes with a ton of pre-implemented games. How hard would it be to run this backend on App Engine? I am going to find out over the next months (yes, months -- I have no idea how hard it is going to be; and the weather is way to beautiful outside to be coding all weekend ;-). I am starting with the 0.3 source snapshot, which I uploaded to http://code.google.com/p/gae-ogre/. I doubt I will have anything runnable for quite a while, but I hope the journey of getting there will yield some interesting posts. Wish me luck :-)

3 comments:

Rob Chiniquy said...

Good luck! Great idea, super-ambitious, especially for summer. I'm looking forward to reading how it turns out!

laurent said...

why applet based apps? it looks like javascript/canvas apps would be more web-aware than applets...

The App Engine Fan said...

> why applet based apps?


why not? ;-)
seriously though: the goal is not to build the new leading gaming platform based on the newest, latest and greatest web technology out there. It is to investigate two very specific problems:

1) how can I build a platform based on App Engine that can satisfy the high performance and scalability requirements of an online gaming site?

2) how can I take an existing, Java-based application, and run it on App Engine? What problems will I run into?

It is not the goal of this project to build a new platform from scratch. I believe that things like OpenSocial is going to be the stuff that that will drive a lot of this in the future, but it adds an additional development overhead that I do not want here. Jogre comes with a lot of games, and while it may not be the newest platform, faces all the challenges that Javascript apps would to become scalable in the cloud. It also seems to have very decent test coverage, which means I can start doing refactorings without breaking too much stuff.

Think of it more along the lines of: what would it take to host a Quake or Team Fortress style game server that hundreds of thousands of users can play on simultaneously (although not necessarily together)?