Flash AIR to iOS Game Sneak Peek: “Smash -a- Mush”

Ok, so here’s the first sneak peek to one of the games that we are producing for mobile devices as Team-O, for our first game we decide to approach a simple game “Smash-a-Mush” is a whack a mole style game where in order to collect points You need to smash the mushrooms and avoid touching other things like flowers, stones or the radish, when we designed this game Stage3D wasn’t available yet for mobile development so we build a little framework and it’s basically a “get more points game” like those Atari games where the objective was to cross as many stages posible and collect points.

We began doing it in Flash CS5.5 but even when is a simple game I find out that we needed to move it to a pure As3 project done in FDT5, why? performance, the thing that took the most time in the development side was that I needed to be really careful with memory leaks and performance issues and optimize the game to use less vector graphics and do the most of the animation using sprite sheets and partial blitting, Fdt5 Profiler was a real time saver and helped me find those memory leaks that using Flash alone would not have been posible.

We are the in the process of finishing the music and audio of the game and hope Apple’s App Store will approve it in the next few weeks. I would be writing a series of more detailed posts of the process of building games with Flash for mobile platforms and give a few tips/warnings for newcomers so they won’t have to struggle with the same problems that we already had, meanwhile You can watch the video of the game running on an iPad 2.

Thanks for reading,
Dave

Robotlegs Modular + Flash CS5 Project Template for FDT 4.5


Click the image to see working example.

So here it is the updated version of my Robotlegs Modular + Flash CS5 Project Template for FDT 4.5, what it does? it will let You create a Flash CS5+Robotlegs Modular project using Robotlegs version 1.4.0 and Joel Hooks version of Stray’s Utility Modular.

Project Settings

The project is set so You can enter your own package structure e.g. “com.yourdomain.project” it will crate a folder called modules with the all the classes needed it will also create a Flash .XFL with the Views( MovieClips) already mapped to Your classes.

I also gave the design a little make over ūüėČ see the example above.

So where do You get this template and how to use it:

1.- Download the Project Template form GitHub extra points if You make a fork.

2.- Install the project template in Your FDT folder:
On OSX the path is: (Your User Name) > Library > Application Support > FDT
For windows: C:\Users\{Username}\AppData\Roaming\FDT

3.- Create a project with this template in Your project settings will be on Web>Robotlegs Modular + Flash CS5

4.- Compile the Project and Enjoy ūüėČ

Quickguide: Using AIR 2.6 in FDT 4

So finally I got some free time to write this post about using the new Adobe AIR 2.6 in your FDT 4 environment, so let’s get to it:

As you know Adobe recently released the Adobe 2.6 runtime and SDK with significant improvements including iOS support bringing feature parity for Android and iOS platforms, more info on Adobe AIR team’s blog.

Some of the new features are:

AIR for iOS

  • Updated AIR for iOS support with improved performance. Developers can take advantage of new features in iOS 4 like multitasking, Retina display for higher screen resolutions, and front and back camera support. Developers can now build application that capture audio with the microphone and take advantage of the same graphics hardware method used in AIR for Android using OpenGL ES2 for fast graphics.
  • Packager for iPhone (PFI) is now replaced with and the functionality integrated with AIR Developer Tool (ADT) a comand line tool for compiling application in the AIR SDK. ADT can now be used to package AIR files, native desktop installers, AIR applications for Android and iOS.

AIR for Android

  • Submit apps to be included in the Amazon Appstore for Android when the store launches. ¬†Companies now have an additional distribution option with one of the largest online shopping destinations on the web.
  • USB debugging was added as an additional debugging option to WiFi.

So what do You need to start testing this new capabilities in AIR SDK 2.6, if You’re part of Adobe’s Flex SDK and Flash Builder private pre-release program You can start testing this right away. If You like to start working with the Adobe AIR 2.6 SDK inside of FDT4 the following guide should be a good start.

1.-Download the SDKs.

Download The Adobe AIR SDK 2.6 and Flex 4.1 latest stable release.

2.- Merge the SDKs

To start using the AIR 2.6 specific features You need to merge the AIR SDK with your flex sdk to do that I created a new copy of my flex SDK renamed it to “flex_sdk_4.1.0.16076_AIR_2.6” and then copy the entire contents of the AIR SDK in there it will ask You to replace files and folders¬† just click ok and move on to next step.

3.- Adding the SDK to FDT


Fire up Your copy of FDT then go to “Preferences->FDT->Installed SDKs “ click the Add button located in the top right of the panel this will open a new panel asking for the “Path:”¬† select the folder path to Your newly created SDK, mine is located in “C:\SDKs\flex_sdk_4.1.0.16076_AIR_2.6” give it a name I called mine: “Flex 4.1 AIR 2.6 SDK” hit Ok and¬† now You’re ready to build a project using AIR 2.6 features, on to next step.

4.- Create a project.

Create a new Flash project by going to “File->New->New Flash Project” give Your project a name, set the project type to Desktop and in the options section of the window change the Flex version to¬† Flex 4 AIR click the “next” button it will take You to the SDK configuration panel, select the one You created in the last step in my case it was “Flex 4.1 AIR 2.6 SDK” then click finish.

5.- Change the compiler settings.


Right click the project You just created select Properties–>FDT Compiler and change the target player from “-target-player={playerVersion}” to “-target-player={11}” this will let You compile and debug Your project without any errors. Remember to set the version of¬† your application to “2.6” in Your descriptor file.

 

I will make a full example on how to deploy and debug both to Android and iOS using an ANT file in another post, until then, happy coding.

 

 

 

 

 

 

Targeting Flash Player 11(Incubator Build) in FDT 4.2.

I know this might be old news by now but this post will help as a reminder on how to get the new Flash Player 11 (Incubator Build) working in Your FDT 4.2 installation. Ok let’s get started.

1.- Download the files.

2.- Update the playerglobal.swc


First thing You need to do is replace the playerglobal.swc included in the Flex SDK because it isn’t Flash Player 11 ready.

  • Back up the playerglobal.swc¬†¬†included in ¬†your Flex SDK location “/frameworks/libs/player/10.2 in the Flex SDK”.
  • Copy the¬†flashplayer_inc_playerglobal_022711.swc to the location mentioned above and rename it to playerglobal.swc.

3.- Setting up FDT.

Setting up the FDT IDE (I’m using FDT 4.20.1272 ¬†installed on top Eclipse¬†Indigo¬†Version: 3.7.0) for working with the Flex SDK is easy just follow the steps below.

 

  • Add the Flex 4.5 SDK You just downloaded to the list of installed SDKs via:¬†Preferences > FDT > Installed SDKs and press¬†Add.
  • Rename ¬†Your SDK to something significant ( Believe Me you can get lost when using several SDKs) I named mine Flex 4.5 Flash Player (Incubator).
  • The next step is creating a new project go to File > New > New Flash Project in the popup window select new AS3 Project and give your project a name.
  • Click next and select the Flex SDK You just added.
  • You will notice that You get a warning on top of that window saying: ¬†“Some classpath libraries are missing …” that’s because the latest Flex SDK nightly builds does not include the flex.swc, on to next step to get rid of that warning.
  • Click next and You’ll be on the SK Library tab select the flex.swc (marked with an X) and click the Remove SWCs button that will remove any warnings about the missing .swc and since we are building an AS3 project we wont be using the flex.swc anyway.
  • The last step is clicking the finish button then go to the project You just created right click and select Properties ( Alt + Enter for shortcuts lovers like myself) ¬†this will open your project’s Properties window ¬†select FDT Compiler from the list and add¬†the flag¬†-swf-version=13 to your compiler arguments..
  • Hit the OK button and You’re set to go now You’re ready to push the Flash Player 11 to it’s limits abusing of it’s new “Molehill” 3D APIs.Happy Coding.

Switching from FlashDevelop 3 to Powerflasher FDT 4 pt.1

I switched from FlashDevelop to Powerflasher FDT 4 beta about 2 months ago and have a lot of things to say about what a great decision it was, I intended to write a series on posts on how to made that move before but unfortunately i haven’t had the time it deserves, so on the next few posts i will cover some tips and tricks that will hopefully will show You how easily and fast is to make that switch and start enjoying truly coding comfort in no time, believe me it’s worth the try.