Sunday, January 22, 2012

Cloudifying Sedition

Recently, Sedition "0.0.3.0" hit the various Android markets I publish to. It was supposed to be the version that finalized the feature set. Of course, I can leave it alone. I've recently started a new job, and for the first time, I work on web/server/'cloud' based technologies. It is interesting in that I absolutely love learning new things, but it's also tough in that I have so much to learn before I feel I can develop software with the speed and craft that I can with desktop and embedded software.

In the previous version of Sedition, I'd experimented with a high score library called "Score Ninja", a mostly painless way to add a high score system to your game. You go to the Score Ninja website register a game, and get a game id, then download a jar and link your game with that, with a few calls into the library to post or retrieve scores. Users are required to download a scoreninja app from the market which handles all of the communication.



Score Ninja was nice, and easy to use from a development standpoint, but I was not quite happy with the end user experience, (eg, having to download an app, that was not available in all markets I publish in). I also didn't have much control over how the leader boards were grouped, displayed and organized. Also, lately, I'd gotten a lot of errors in trying to view the leader board on my test devices.

I decided that I'd right my own scoreboard system for the next release. I'm using the Google App Engine, to service the scoring system, and it will have a browser front end so that detailed score stats can be viewer in a browser. I believe the Score Ninja server is also a GAE application.

I'm still on the fence about it, but I might implement part of the server side in Scala. My new job uses that, so there addition motivation to attain a level 70 command of that language. I have found that my C# background helps a lot more than Java, since there are many Scala features that also exist in C#, but not in Java, such as closures, lambda functions, collection comprehensions, and operator overloading. The JVM on the App Engine supposedly runs Scala applications well.

Given that I'm not yet much of a web developer, I'm also using the Google Web Toolkit to actually build the website portion of the leaderboards. The GWT features a system that compiles Java code intentend to run client-side into Javascript that runs in a browser. For the most part, you can write your application as if it were a "fat" client desktop application talking to a server. The App Engine has support for GWT, in fact the same Eclipse plugin is used to work with both APIs. The only limitation of the GWT is that it is not truely a JVM running on the client side, and the GWT "compiler" needs access to the *Java* source code for any libraries you use.

--P

No comments:

Post a Comment

I welcome you're thoughts. Keep it classy, think of the children.