Tuesday, November 22, 2011

State Machines


The third course--State Machines-- in my Strategy Games in ActionScript 3 series is now available from CartoonSmart.com.
  • 5 hours
  • Learn to master state machines in part 3 of the Strategy Games in AS3 series. Attach A* to sprites to move them across terrains, bringing together the two previous parts of this series.
  • Create a shaded terrain.
  • Dynamically adjust contrast with the ColorMatixFilter class.
  • Create multiple states for an object.
  • Progress from a simple switch statement to object-oritented states.
  • Create multiple players.
  • Learn to create a turn-based environment for units and players, for both human and computer input.
  • Create computer opponents.
  • Create multiple unit types: land, air, computer and human.
  • Use the bitmap class to create a “fog of war” that reveals the map as units move.
  • Differentiate between turn-based and non-turn-based states (and support both).
  • Add combat between units.
  • Refactor to use a singleton design pattern.


You can also get a bundle of all three courses, 10 hours of training:
  • Terrains
  • A* Pathfinding
  • State Machines



Wednesday, November 16, 2011

Adobe releases Flex

Adobe announced they are contributing Flex to an open source company. What does that mean to Flex developers? Well, Flex has been open source for some time now (since version 3), the big difference is that Adobe will not be guiding its direction. I'm wondering how much of that means dollars.

What is Flex? It is a framework of APIs written to facilitate application development on the Flash Player. A wrapper around the Flash Player APIs.

Flex is also a term people used to refer to Flex Builder/Flash Builder. The IDE sold by Adobe to write Flex applications. It is really just Eclipse with a plug-in that Adobe developed. There are other tools (commercial and open source) to develop not just Flex applications, but also pure ActionScript applications. Adobe has never seemed to put big money into its development compared to its other tools like Illustrator and Photoshop. But then lately as I've looked at Adobe apps, it seems like outside of those two, they have not been doing anything dramatic with Dreamweaver or Flash Professional, those seem to be more in maintenance mode than any big development.

As someone who has had great experiences with an open source tool (Blender), I know that it can be done right if led by the right person. But Adobe is releasing it to a group, so who's going to lead?

The real question for me is not what is happening with Flex. It is a good framework, but frameworks come and (look at Flex 3 vs Flex 4). Nor is my question what happens with Flex Builder, anyone who's seen my AS3 videos knows I don't use it exclusively during development. My question is what are Adobe's plans for the Flash Player?

I wanted to title this post "If 3D, then death". When I saw the introduction of 3D support with Flash 11 at MAX I made a joke about Flash must be near death. 3D was introduced into Director when it was near its end. But the Flash Player is still alive and well on hundreds of millions of machines and devices.

This announcement is about something Adobe does not have a knack for, making money on a framework (who does?) and creating software development tools. Where does Adobe make its money? For the first half of its life, Adobe made its money on licensing PostScript. Is that still the case? When I first saw Flash taking over, I remarked that it was like PostScript for the web. It didn't surprise me when Adobe acquired Macromedia.

The Flash Player, it's support of AS3, and it's great set of APIs for doing very visual apps is what I really enjoy developing with. The combination of ActionScript 3 and the Flash Player APIs has been the most fun developing since Lingo's update in Director 4 back in 1994. In addition to AS3, I've used many languages, popular (Java, C#, C++, Python, JavaScript) and less popular(Prograph, Lingo, Applescript, HyperTalk). AS3 is outstanding when combined with the right tools.

Adobe showed at MAX forthcoming tablet apps that were made with Flash, so they still have a vested interest in the platform for the moment. Heck, the Flash player was all over MAX, Eclipsing other tools (no pun intended... okay, it was intended). From a developers tools standpoint, HTML5 and JavaScript is not there yet. Adobe has shown it can create a great runtime and core APIs. With tools like Flash Builder, Adobe has shown they're not the best with creating software development tools. Maybe they're better off with their core strength of creating visual tools for designers, HTML5 being just one more medium to output to.