I thought of sharing some of the latest stuff I stumbled upon while making a kinda “Papertoss” or “Flick Soccer” clone with FDT5 and iOS, based on Away3D and Adobe AIR 3.2. This is what I’ve got after two evenings now (I’ve got no idea why TwitVid rotated the video source by 90°). Don’t consider it as being finished or something. This is just a very rough proof of concept!
Setting up your ADL
I think it makes a lot sense to set your ADL resolution the same as your device. That means you have to set up a specific SWF size (via meta tags, e.g.) and set up the width&height in your app descriptor. Make sure you’re targeting the app-descriptor in your launch config (=> “Start” tab). Besides I’m used to set the -default-size compiler argument to fit my device size as well. Feels a bit safer to me. I really need to figure out these three params in connection with scaleMode and stuff one day.. However, setting all this makes your ADL pretty much look like the app on your device, so positioning and scaling your objects really become way more realistic while working.
Read the release notes!
They contain crucial stuff you need to know!
Flash Player 11.2 and AIR 3.2 Release Notes (PDF)
Use ipa-test-interpreter with ADL Wifi Debug
What that means is that your application gets packaged way faster than with the standard mode. In comparison: Standard debug packaging: 4min 49sec | Interpreted debug packaging: 13sec.
This allows you to quickly install the app on your device, connect the ADL via WiFi and debug it. However, the performance is awful. From 60fps to 10fps. But as I want to debug stuff it’s not that important. Are you interested more in this topic? Leave me a reply so I may upload a video tutorial on this.
You have to set the -swf-version to 15 in order to make use of AIR 3.2′s stage3D.
As with desktop or browser SWFs you now need to set the renderMode to direct for mobiles as well.
Though Away3D has currently a bug considering this, it is highly recommended to set the “depthAndStencil” param to true in your App-Descriptor when working with 3D objects. Besides:
For an AIR 3.2 or later application compiled with SWF version 15 or higher, if the renderMode element in the application descriptor file is direct, then the depthAndStencil element in the application descriptor file must have the same value as this argument.
Be friends and ask
One important thing I’ve realized is that without any help of others, it’s really hard to catch up with all this new stuff. There are just things you cannot know by heart as they’re nowhere documented. So, don’t shy to ask for help on Twitter! Most of us Flash developers are kind persons who are willing to reply :)
As with every “new” stuff that’s happening.. the developers need your feedback. If you’re experiencing a bug with stage3D in general, go and tell Adobe! They’ve got a bugbase to track things and they need your input in order to fix it. The same for any engine you’re using. I’m familiar with Away3D and as it’s all shiny and new, many things don’t work as expected. Tell them so they can check&fix it: Away3D Issues on GitHub.
It’s all getting better. I’ve started more than a year ago with mobile development and Adobe AIR. More than 20 Sprites on stage was unthinkable these days ago. And see where we are today :)