Dino Run

May 5th, 2008

I love the guys at pixeljam, they’re what’s right with the Flash game world.

They have a new game, and it even has multiplayer. Dino Run. Nothing quite like it I assure you, its well made but simple, and fits very well into the ADD world of Flash games. I’ve been a beta tester for the game and its pretty fun.

Adobe has started something called the Open Screen Project. They’re going to do 4 things as part of this.

  • Removing restrictions on use of the SWF and FLV/F4V specifications
  • Publishing the device porting layer APIs for Adobe Flash Player
  • Publishing the Adobe Flash® Cast™ protocol and the AMF protocol for robust data services
  • Removing licensing fees – making next major releases of Adobe Flash Player and Adobe AIR for devices free

This is the way the winds are blowing anyway, but regardless it’s a great step forward. The most important thing I see is that the Flash specifications no longer require the reader to not make a Flash Player based on them, allowing the proliferation of open-source alternatives. Since the offical player can also be freely ported to different environments as well, it looks like Flash is, and will remain, the standard.

I read this post on what not to do with private properties. It’s for Java, but applies to Flash as well. Apparently declaring a property is the “amateur” way to do it. This is how I would do it.

public class Person {
private var _age:int;
public function Person(age:int) {
_age = age;
}
public function birthday():void {
_age++;
}
}

According to this fellow, that’s bad practice. You should always use accessors! Why write short concise code when you can write three times as much? Instead of age, use getAge() and setAge() because apparently its a lot better to write setAge(getAge()+1), rather than write age++.

Flash’s accessors would allow you to write age++, but this is still the most disturbingly defensive code I’ve ever seen. It’s a private property! A class is supposed to be able to manage its own properties. It’s other classes you’re supposed to mistrust, not your own. If a class has become so big it requires this kind of nonsense that’s a pretty good sign it should be split up into smaller classes.

In my opinion his only valid complaint is that its easier to make breakpoints. Fortunatly most of the comments for that article disagree with his opinion.

The serial you get works on the Linux version, which is currently in alpha. Get your serial here. Thanks to Colin Moock for pointing it out.