Wednesday, June 11, 2008

I've finally started working on some web games. The first thing I did was spend a bit of time investigating what platforms are available. And it really was a bit of time, because it looks like Flash is still the beginning and then end of choices if you want a reasonable fraction of people to be able to actually play your game. So I downloaded the Flex demo and started playing around.

Actionscript 3 is a hybrid language, trying to mix mediocre static typing (like C# or Java before generics) with the dynamic typing of previous versions. It seems to me like it really tries to push you toward the static side, though. For example, in the default configuration, Flex requires type declarations on everything, so if you want a plain old dynamic object, you have to write

var x:Object = {...}

where it used to be just

var x = {...}

On the whole this is more annoying than useful. I'd rather have it do type deduction, so that

var x = {...} // same as x:Object = {...}
var s = "..." // same as s:String = "..."


Other languages (C# 3.0, C++, VB, etc.) are going this way, and it really works much better. Maybe ActionScript couldn't do this for backwards compatibility, but it would have been nice.

Ok, so this wasn't insightful. At least I got another post up.