Flash

Flash CS4 – A Minor Update? Nope.

AppleInsider just released some details about CS4. They’re saying that insiders call it a “minor update.” Over on Keith Peter’s blog, he argues the point by praising these new features, “bones, 3D, PixelBender, sound synthesis, new text engine, new drawing API.” In response, Steven Sacks comments “Wait a sec, Keith. You’re talking about features of the player/actionscript. Let’s not confuse the language or the runtime with the IDE. You can access the features you listed without using Flash CS4.”

I agree that most of the features I’m really excited about are in FlashPlayer 10 and not necessarily in Flash CS4. But take my company for example. We create Flash games. We heavily rely on inheritance, code reuse, and modularization. We have a great system setup where you can open any smaller module that you want to reuse in a future Flash game, copy a single folder from the Flash Library to your new game, import and initialize the object in the new game, and you’re off and running. This makes creating the ground floor of a future flash game extremely quick and efficient. After 3 years of refining this process, we have arrived at what we believe to be a fantastic work flow from design to engineering.

I am extremely excited and intend on using immediately many of the new features of FP10. The only reason we haven’t already is because, currently, this requires Flex. It would take us countless hours and tons of money to get everything converted to Flex. This simply is not an option for us. So if a new Flash IDE called CS4 came out and was exactly the same as Flash CS3 except that I could leverage all of the new FP10 features *directly from the Flash IDE*, I would be sold without hesitation. As Keith claims, for many, FlashPlayer 10 = Flash CS4. If you use Flex instead of Flash CS3, then feel free to review the latest version of FlexBuilder. But as for a person who leads a team of people who use Flash CS3 40+ hours / week, we are all very excited about the new version.

FlashAIRBenchmarkTest

Flashplayer and AIR Benchmark Test app

I’m currently using the Flashplayer in more of an embedded system configuration. We’re evaluating multiple hardware configurations to decide what hardware to use and we’re also evaluating multiple version of the Flashplayer to decide which Flashplayer to use. So I made a quick open source test app to help with this evaluation. It allows you to compare animation performance between an EnterFrame animation vs a Tweener animation vs a Timeline animation. You can also apply various effects to see how they impact things. Since scaling can skew results, the app is designed to run at a specific resolution, but it is easily scalable to whatever resolution you wish to test (and steps are included in the source).

The results have been rather bewildering at times. Depending on the hardware (and I think the OS as well), I have seen filter effects drastically decrease the performance, drastically increase the performance, I have seen full screen mode have great impact or no impact, I have seen the AIR version help the performance and hurt the performance, and just about everything inbetween. Crazy! Anyway, tell me what your hardware/OS/Flashplayer version combination are, and what sort of results you get in the comments.

Usage:
It should be fairly straight forward. Just drag the sliders to add a new ball that is animated in the specified method. You can click on the top half or bottom half of the DiagnosticStats window (thanks Mr. Doob!) to increase or decrease the max fps. Use the + or – keys to increase/decrease the maximum # of balls allowed. In the AIR version, press Q or X to quit and click and drag the background to move it around.

FlashAIRBenchmarkTest

Demo | Source | AIR | AIR Source

Should Adobe follow the new ECMAScript 3.1 standard?

For background, read:

Keith Peters just posed a good question, Why Standards?. On the one hand, standards are undeniably good, assuming that the point of a “standard” is that many adhere to it. It’s pointless to call something a standard if you are the only one following it. For example, take the metric system vs the english system of measurement. There are really only two standards and it still causes us problems. Remember the $125 million lost Mars Climate Orbiter in 1999 because someone didn’t convert from one standard to another? Or closer to home, remember the problems of figuring out why your page looked one way in IE, another in Netscape, and another in Safari? The same page could look drastically different. Or how about the standard of XML? What a fantastic concept! I love that I can import an Excel file directly into Flash if I want to thanks to XML, or that I can interface with an app written in an entirely different language over Ethernet because it talks XML. It’s undeniable that standards can be very powerful.

However, it’s also undeniable that not everything should follow a standard.  How boring it would be if everyone’s web page had to use the exact same look and feel and no one was allowed to use anything but text. This is, of course, ridiculous. Standards can be very powerful, but they can also be very inhibiting.

So the real question is not, “why standards?”, but rather,  “should Adobe follow the new ECMAScript 3.1 standard?”

The only time I ever wish that various rich oop languages were more “standardized” is when one language has a really nice feature/ability that I become dependent on, and then I switch to another rich oop language that doesn’t support it. For example, there are many times that I have griped that I wish AS supported all of the features that usually come “standard” in other rich oop languages, such as private constructors, function overloading, strongly typed arrays (vectors), etc. ActionScript 3 was a big step in the right direction and I thought ES4 would solve most of my remaining gripes.

My view, however, implies that a standard in the programming world is used to set the *minimum* feature set that a language has, NOT the maximum. I agree with Keith Peters, that my employer and my personal career as a developer are both completely unaffected whether AS follows a named standard or not. On the contrary, I feel like AS currently *is* the standard, and undeniably so in the current RIA world. I believe Adobe should consider the ES3.1 standard and follow it where it makes sense, but I strongly believe it should ignore it altogether when it’s not in the best interest of the language or the community. Again, if MS, Apple, and Mozilla all decided that their browsers would support text only to be more standard with each other, everyone would jump ship in a heart beat to a “less standard” web browser that pushed the technology limit and supported images, video, sound, etc.

I believe Adobe has been pushing this technology limit for the last decade, and that they should continue to do so without consideration of slowing down in order to be able to claim that they are “compliant”.

Oh, and since we’re no longer worried about being compliant, can we please have private constructors back and true support for function overloading? ;)

Re: The Open Web is Slow

This is in response to Ryan Stewart‘s post: The Open Web Is Slow.

Thanks for the post Ryan. I agree with much of what you are saying and as a non-Adobe employee, I definitely agree that Adobe does better-than-most commercial companies at contributing and fostering the open source community. In-fact, the Flash community, by and large, is  a community that really believes in Open Source, whether it’s for silly experiments, or full blown engines like Tweener or pv3d.

However, I believe it would help the community if there was some sort of post explaining Adobe’s reasons for not open sourcing the Flash Player. I can speculate reasons, but it seems open sourcing it under the right licensing structure would be beneficial for everyone.

At the company I work for, we do a lot of development using Qt by Trolltech. They have a great licensing structure that states the following:

“The main licensing options available are:
* Commercial Licensing. This is the appropriate option if you are creating proprietary applications and you are not prepared to distribute and share the source code of your application.
* Open Source Licensing. This is the appropriate option if you want to share the source code of your application with everyone you distribute it to, and you also want to give them the right to share who uses it.”

Trolltech gets free contributions from the community to their source, and they foster a community that does free advertisement for the company (by the sheer nature of Open Source). Their commercial licensing is not cheap, so the company still makes great money. It’s a win/win for everyone.

Flash has such an extremely creative community that is always pushing Flash to its limits. I believe the tools that would be created if the Flash Player were open source would be incredible. At the same time, I love Adobe’s products and do not want the company to decline financially. But I believe the opposite would happen: even more people would desire to use Flash as the tools for developing it get better and better.

We’re Hiring: ActionScript 3 Engineer

Well, we’re basically always hiring (so apply even if this ad goes away), but given that the OSFlash Job Board just had a relaunch, we thought we’d try our luck at using it.

Here’s the contents of the job posting:

ActionScript 3 Engineer
DigiDeal Corporation, Spokane Valley, WA

Deal yourself a winning hand! Join DigiDeal and develop digital games for the gaming industry! DigiDeal is the worldwide leader in electronic table game development. Our Digital Table System and game portfolio are recognized around the world for engineering excellence and innovation. We offer fully paid benefits, matching 401k plan, and competitive salary/incentives. DigiDeal is an EOE. If you’ve got what it takes, get in the game and work with the most creative and dynamic casino game developers.

DETAILS
-Develop multi-player Flash-based games
-Write Flash apps for touch screen technology
-Code exclusively with ActionScript3
-Join a team that is always trying to push Flash to its limits!

REQUIREMENTS
-3+ years software development
-BS/MS in CS or equivalent experience
-ActionScript 3 (preferred), AS2, Java, or C++
-Strong OOP skills is a must
-Game development is a plus

You can also apply be e-mailing me directly: natejc at this domain name dot com.

Adobe MAKE SOME NOISE

I was also having problems with the SOUND_COMPLETE event. I discovered Andre Michelle‘s post petition about it and promptly added my name to the list. There have been multiple other people posting about the problem also. Unfortunately, the only response that I could find from Adobe was by Brent Baker on a bug report for the issue that states:

“FlashPlayer issues should be reported here. Also you will need to provide much more information on the issue: http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

It seems that the bug was closed without actually looking into it. Bummer.

Adobe, MAKE SOME NOISE

Adobe MAKE SOME NOISE!

Flash ActionScript 3 X,Y Wireframe Preview, 1

Automatic Flash X,Y Wireframe Preview

At the company I work for we use Functional Specification documents for any new Flash game that we make. Before any of the developers start any coding, the design team puts together a simple frame by frame Flash file to make it easy to see what things will look like in the various states of the game. This will eventually become screen shots put into the spec. There will be an additional section put into the spec that includes all of the top-left and center x,y coordinates for each MovieClip on the stage during each frame. That was usually a tedious part of the job that none of the designers liked doing. When they brought this to my attention, I decided to make a quick script to do this for them. Here are the results:

USAGE:

  • Copy and paste the code into frame 1 of any Flash file
  • Make sure all objects that you want wireframes for are Symbols (for some reason, the x,y is off if they aren’t)
  • Run the swf
  • Use the arrows keys to change frames
  • Use space bar to toggle wireframe view
  • You may press the space bar multiple times to get new random colors
  • You can click and drag on the x,y text to move it to a new location

SAMPLE:

Flash ActionScript 3 X,Y Wireframe Preview, 1

Flash ActionScript 3 X,Y Wireframe Preview, 2

demo | source (.fla) | source (.as)

mouseEnabled and mouseChildren Affect CPU Load

I was reading a post from Keith Peters today and noticed a comment made by Ryan Taylor mentioning that mouseEnabled and mouseChildren affect the CPU load. I had to know if this was true or not so I promptly created an experiment app. The app randomly creates 700 parent sprites and 700 nested children sprites. You press the SPACE bar to toggle .mouseEnabled and .mouseChildren for all of the objects.

I couldn’t believe it. Although disabling these properties did not seem to affect the FPS, it definitely affected my CPU. When tested on my WinXP,SP2 machine with a P4 3.4 HT CPU, the swf was taking 13-16% of my CPU. When I set mouseEnabled and mouseChildren = false, the CPU load dropped to 4-6% total! It cut down the CPU usage by about 300%! Very good to know. Thanks for the tip Ryan!

mouseEnable CPU Test swf

demo | source

MD5 Checksum Doesn’t Match in swf Files

In the gambling industry, software integrity is vital. It would be all too easy for someone to write a magical up, up, down, down, left, right, left, right, b, a, sequence into an electronic gambling machine, tell a few friends about it, and make some money. To prevent this, most jurisdictions require the game to go through an approved lab before they will allow it. In the US, the primary lab is called GLI (Gaming Laboratories International). GLI requires a copy of our source code and the ability to build the game in-house. They then use the md5 (Message-Digest algorithm 5) checksum from this in-house build to compare with any other created “copies” of the game to determine if any tampering or errors have occurred.

This works fine for C++ code, but what about compiled swf’s? Using the Adobe Flash CS3 IDE, I compiled one swf, duplicated it, and then used the Windows freeware tool MD5sums 1.2 by Jem Berkes to see if the checksums matched. Sure enough, a perfect match. So then I recompiled the swf without changing anything at all, and retested the checksums. No match. Well, I assumed that the compilation date would give me a problem, but I thought that I might be able to do some code injection to fix this issue. So I ran a hex compare on the two “should-be-the-same-swf-files” to see what was different. There were TONS of differences! Way more than could be warranted by just a time stamp change.

Adobe, help me out. As Flash broadens its competing markets and as it becomes more and more common on the casino floor, there has to be a way to compile two swf’s that will be byte for byte identical. I wonder if Silverlight allows this?

Whatever happened to Saffron UML?

Back in May 2007, I posted about Flash and UML. I mentioned Saffron in the post and Samuel Agesilas (author of Saffron) posted a comment saying, “I’m honored that you would like to be on the private alpha. I most certainly can put you on that list. I will email you all of the info,” but I never received any info, even after a couple of follow-up e-mails.  Then, he finally responded saying life got busy (I can definitely relate, understand, and sympathize) and that he was planning on posting a public beta the 2nd week of December and he said “I will however shoot you an early build sometime before [then],” but I still haven’t seen anything. His last Saffron blog update was back on October 6th.

Maybe life got too busy and he’s no longer working on it? I would gladly continue work on it if you happen to be reading this and need any assistance Sam. I would have started my own Flash UML project had I not discovered Saffron and seen how gorgeous it looks. I hope to see this project’s development continue!

Does anyone have any further information?

Flash in Casinos and G2E recap

I returned from Las Vegas a couple of days ago where the company I work for, DigiDeal, was an exhibitor at the biggest casino/gambling convention in the world, G2E (Global Gaming Expo). There were two highlights for me:

1. My parent company, IGT, has a distribution and development agreement with Microsoft for their Surface computing. I got to ‘go behind the curtain’ (literally) and have a personal demo of the multi-touch technology. Oh man is that stuff cool! I truly believe this is going to be something that changes the future. If you’re not sure you agree with me, check out the three video clips here. I can imagine some sweet multi-player Flash games!

2. It was very interesting to me to see just how many of the latest electronic casino games are using Adobe Flash for the front end. It seemed like every third game I checked out was done this way. Once Adobe releases AIR 1.0 and includes Linux support, I expect this number to raise significantly. It is very cool for me to see how many very unique implementations and applications Flash has found its way into. You rock Adobe, just get me AIR on Linux soon  ;o)

Particle System, v0.1

Particle System, v0.1

I have seen many particle systems released on many different blogs. I’ve always thought that they were pretty cool and I’ve thought multiple times about making one myself, but decided not to for the single reason that I didn’t want to be just the next guy to jump on the bandwagon of things that have already been done. But, after seeing Seb Lee-Delisle’s presentation on particle systems at Flash on the Beach ’07, I became a little more interested in doing it. Then, at the end of Robert Hodgin’s extremely cool presentation about processing, he left us with one simple image:

Robert Hodgin's motto

I don’t want to make the same crap that everyone else has been making, but I feel like you need somewhere to start. If a particle system was a good enough starting spot for Hodgin, it is for me to. So, on the plane ride home yesterday, I made my particle system from scratch. I didn’t want to look at anyone else’s code or algorithms, for better or worse, I just wanted to go for it. So, this may or may not be the most efficient way to do it, but here it is:

Particle System, v0.1

demo | source

More work on this to come in the near future…

FotB ’07, Astro (Flash Player 10), & Diesel (Flash CS4)

In-spite of some personal international traveling hiccups, Flash on the Beach 2007 was an incredible conference! I learned something new or was greatly inspired at nearly every session that I attended. I’ll be covering the specifics of these sessions in greater detail in a series of future posts. However, the Adobe keynote done by Richard Galvan deserved its own post, of which I wanted to get out straight away.

Many of the new features that will be in Diesel (Flash CS4) we are already aware of from the announcements at MAX and other various places. These features include H.264 support, multi-core support, a 2.5D feature set, a new and improved text engine, full screen hardware acceleration, programmatic filters (Hydra), etc.

However, there were a couple of features & changes that I either didn’t know existed at all, or else I learned some further details that I previously did not:

  • Typed arrays (vectors)
  • 64-bit support
  • “Mobile convergence”
  • Hydra to use the GPU (if available)
  • New ‘object-based’ tween model
  • IK (Inverse Kinematics) Tweens

Typed arrays. Given that typed arrays are part of the newly proposed ECMAScript4 standard, I had anticipated Adobe would follow suit eventually, but I didn’t think that they were planning on including this in CS4. Given that Adobe just released AS3, I had assumed that they would not modify the language until CS5 in order to give the world a chance to catch up and not have to call code they write this year, “legacy code”, in the very next version. I’m certainly not complaining, however, as I have always believed this is something that should have been part of AS3 in the first place (right along side of the ability to have private constructors and properly implement the singleton pattern).

64-bit support. For obvious reasons, the community has been crying for flash 64-bit support for some time now. I had hoped that CS3 might support it, but am definitely relieved to hear that CS4 “officially” will.

“Mobile convergence.” Although I’m not entirely sure what is implied by this, it sounded to me like they intend to remove the current separation between Flash and Flash Lite. The Nokia N810 was referenced as an example of a mobile device that already supports full fledged Flash. Although there are some obvious negative ramifications of this, mobile hardware advancements are happening so rapidly, I believe this is a step in the right direction and that soon enough, the ram-hog known as Flash should run, for the most part, just fine on most mobile internet browsers. It will certainly be a solution to the great-many web developers that currently do not consider mobile devices when creating their Flash content. I agree with Aral in that, “I don’t think Flash Lite is going away any time soon,” but I do believe its days are officially numbered.

Hydra to use the GPU (if available). I have heard some confusion about whether this is true or not from various blog postings. It was wonderful to hear straight from the horse’s mouth that all filters made in HYDRA will in-fact use the GPU (if one is available). I was fearful that many would-be web developers would start going crazy using all these open source filters that they found online, and our web browsing performance would start to go down the drain. Although this may still be the case for GPU’less systems (such as most mobile devices), it should definitely allow for some powerful filter effects on *most* systems to run quite smoothly.

New ‘object-based’ tween model. Adobe is planning on making their timeline tweening creation system “object-based.” Currently, if you want to create a tween, you create a new keyframe, right click on it, and then choose add motion/shape tween. In Diesel (CS4), you’ll instead place the object that you want tweened on the stage, right click on that object, and then create the motion/shape tween on the object itself. You can then click to any different point on the timeline, manipulate whatever you’d like about the object, and magically, a new tween has been created. The difference is subtle, but since motion tweens will soon be based on the object instead of the timeline, you can do things like manipulate (scale, rotate, etc) the entire tween as its own object or entity, you can use native bezier curves to guide the object’s path, and many other cool features. It sounds like you will still be able to visually see “keyframes” for any particular tween in the timeline, you can even select which keyframes for which property should be displayed. For example, you could choose to view the keyframes that correspond to location only, or to color only, etc… Very cool. Check out this video:

IK (Inverse Kinematic) Tweens. Most of us were already pleasantly surprised at the MAX ’07 announcement that Adobe was going to support Inverse Kinematics (for more information on what it currently takes to do this in Flash, check out Keith Peters excellent book, Foundation Actionscript 3.0 Animation: Making Things Move!). But, FotB ’07 was the first time that they announced native IK tween support! This was so cool that I’ll let the video do the talking:

All in all, it was a great session. Oh, and for historical records, Paul Betlem (senior director of Engineering for the Flash player) pledged the following four commitments regarding future versions of flash:

  • Backward compatibility
  • Fast, efficient distribution
  • Secure experiences
  • Cross platform support (Mac, Windows, & Linux)

Thanks John Davey for organizing such an excellent conference!! Hopefully I’ll get to see you again at FotB’08 (which Davey announced will be Sept 27 – Oct 1, 2008)!

I posted various pictures from the event on flickr which can be seen here.

Flash on the Beach 2007 schedule

It seems like every year, I hear posts about Flash on the Beach, being the ‘best conference ever‘ in one form or another. I have always dreamed of attending a Flash on the Beach conference and this year, I finally get to! My only let downs will be that Phlash5 will not be performing and I won’t be arriving in time for the  Adobe sponsored poker tournament. Other than that, the classes and speakers look incredible. Here’s my schedule:

Day 1: Monday 5th Nov 2007

09:00am Keynote: Overview of Flash CS3 Pro. Richard Galvan
10:15am AS3 Particle Effects. Seb Lee-Delisle
11:30am Story. Branding. Visual design. Chris Orwig
01:30pm Make Flash Games. Retire Early. Keith Peters
02:45pm Papervision3D CS3 Component – get er’ done! John Grden
04:00pm Breaking away. Robert Hodgin
08:00pm If it aint broke – break it! Brendan Dawes

Day 2: Tuesday 6th Nov 2007

09:00am Flex and ActionScript 3 Worst Practices. Ted Patrick
10:15am Perceptive Interactions + Alternative Interfaces. Craig Swann
11:30am Let’s talk about SWX, baby! Aral Balkan
01:30pm Next Generation Websites with Papervision3D. Carlos Ulloa
02:45pm Flashing Flex. Hillman Curtis
04:00pm Dynamic Abstraction. Joshua Davis
08:00pm Beyond the Knowledge: The Art of Playing. Erik Natzke

Day 3: Wednesday 7th Nov 2007

09:00am Building Red5 Applications. Chris Allen
10:15am Stylizing Flex Applications. Joey Lott
11:30am Optimizing Workflows with Eclipse and FDT 3.0. Carlo Blatz
01:30pm The Nooks and Crannies of ActionScript 3. Branden Hall
02:45pm Play! – The ‘art’ of not getting too serious. Andries Odendaal
04:00pm Algorithms to Fill Space. Jared Tarbell

Save me a swx moo card Aral!