Thursday, December 18, 2008

A plunge into UI programming with Scala

Over the last couple of month, I have been working part-time on a new project: Kogics. The basic idea behind Kogics is to provide educational games and tools for kids. Even in this early stage of its life, Kogics has started to be pretty useful. I am using it to help my seven year old daughter practice her arithmetic skills. I have also been using it in evening computer-fun sessions with kids in my neighborhood in Dehradun, India. And Kogics is being used at a couple of schools in India as part of the Samvedna project.

The games on the Kogics website are written in Scala, and are deployed as applets. Yes - you heard that right: they're deployed as applets! I last wrote an applet sometime in 1996, in the early days of Java. And I have never really done anything much with Swing. But I must say that Swing programming has turned out to be surprisingly pain-free, especially with Scala adding a nice fun (and power) factor to the mix. The Java runtime, as of JRE1.6u10 onwards, has (so far) turned out to be a pretty good way to deploy rich content on the web, despite the bad rap that it has in this area. Proguard is the magic sauce that makes all of this work in an efficient fashion, with applet sizes in the 20-30k range.

To see what I have been upto, check out the following:
The Addition Game
The Subtraction Game

Feedback is welcome (especially if you have kids).

And did I mention - I'm hosting parts of Kogics on the Google App Engine (the rest of Kogics runs on Wikidot). This has made me go off and start learning Python - which is currently the only language supported by the App Engine. It's been good fun so far. More on this in future posts...

I am planning to put in a lot more interactive stuff on the Kogics website in the coming weeks and months. As my proficiency with 2D graphics, UI development, and game-programming (goes up from zero and) increases, I'm hoping to create some pretty interesting and useful games and tools. Stay tuned!