Archive for Flash Programming

Postmortem Flying Girl for Indiecade 2013

This is a project I’ve been working on for a few months last year. It was meant to be submitted to IndieCade independent game festival, but it didn’t quite make it. Although the judge liked the idea of a strong female character, there was probably too much competition in 2013. I wanted it to have full color puppetted(?) animation like in Blade of Muramasa, but it was quite expensive so I decided to go a black silhouette style (possibly it’s downfall?).

I consider this a learning project. My philosophy is that if I’m going to learn something always try to make something reasonably attainable, and useful so it can serve another purpose, not just learned and thrown away. Matrix Rampage was my very first Flash game, where I learned Flash and made something cool at the same time. So in this case I always wanted to try to submit to a game contest or festival. I still can use its game engine in the future and I’ve already salvaged the tools I made for other purposes.

For Flying Girl I learned a lot of the Starling Framework, which taught me mobile gaming concepts. It’s the first time I had to deal with sprite sheets on a large scale. I also learned iMovie on a Mac and made this trailer, voiceover thanks to British lady on Fiverr:

Flying Girl Trailer – Indie Game from Digital Vizions on Vimeo.

Flying Girl is an unusual story about a girl who can fly. She is angry at God and has to kill demons to become an angel so that she can talk to him and find out if he is real. There is way more to this story, it’s been brewing in my mind since I was in my teens. It’s a novel I want to write someday, which will be the reason for my next learning project …

The title screen

A blurred crow flies by, I was particularly happy with this

Tutorial in the beginning, purple arrows indicate enemy locations

Fighting in the game, has meters appear briefly on every hit

Some great sketch art of Flying Girl

Menu screen for selecting upgrades

A made a quick Flash tool to parse data for animation, attack and body frames

Simple NodeJS Crypto and AS3Crypto Equivalent

There is very little documentation. It took me two days to get NodeJS Crypto and AS3Crypto to spit out the same results. The encryption algorithm I chose may not be the best, and there is no IV, but atleast I can get Node and AS3 communicating properly with encryption. I’ll find something better like ‘aes192’ but ‘des-ecb’ is working fine and is what I’ll stick with for now as I get my project up and running. Googling for this is hard, hopefully this will help someone out there. Please leave a comment if it helped you so I know I’m not wasting my time posting all these code bits up thx!

Key = 12345678
Text = Hello World
Encrypted = 01Jk6AecyqldguNoHIO7dw==
Decrypted = Hello World

Working with AIR and TestFlight

I had a hard time understanding this error as it pertains to Adobe Flash AIR, I finally figured it out and decided to share it with the world. If you see this error:

“Invalid IPA: The get-task-allow values in the embedded.mobileprovision and your binary don’t match. Are you sure you created the IPA with the same type of certificate as the one you used to compile it?”

You can fix it by going to Publish Settings > Deployment > Certificate. That certificate should be your distribution certificate NOT your development certificate. Also “iOS deployment type” should be set to “Deployment – Ad hoc”. Also remember any device that you add must be in your list of iTunes test devices, then you have to check them off for each provisioning profile and download them again. It’s a pain, hopefully this helps someone. I’ll put up more detailed instructions later.

Installing to iOS device directly via AIR 3.4

Flash hasn’t died yet, and this great new feature is definitely an improvement. You can now deploy directly to device without a Mac and now without using iTunes. You still need iTunes on the computer. Here are some instructions on how to do it. First install AIR 3.4 on your Windows machine:

Just get the ZIP version and make a folder on your C drive “c:\air3.4”. I’ve made a habit of putting command line programs right on my C drive to save headaches. I notice one problem, your builds have to use your “Ad Hoc Provisioning Profile” AND “Deployment – Ad Hoc” or you’ll get a “Installation Error: PackageExtractionFailed” error. I also got “Installation Error: PackageInspectionFailed” but I recompiled to fixed it. Hopefully they’ll fix this soon because Google is not turning up anything about those errors. Eventually it would be great for remote debugging builds, but for now if I notice anything funny, I’ll just build a debug version and install using my Mac as usual. Here are my iOS publish settings:

All you have to do is publish your app and in the folder of the resulting IPA you can create a BAT file to uninstall and install the app in one shot. Now I don’t have to run to my iMac just to install. Here is my BAT file, please let me know if it needs improvement. This assumes you only have one iOS device attached (via USB) to your Windows machine:

@echo off
echo Uninstalling ...
call c:\air3.4\bin\adt -uninstallApp -platform ios -appid com.mysite.MyGame
echo Sleeping ...
ping -n 5 >nul
echo Installing ...
call c:\air3.4\bin\adt -installApp -platform ios -package MyGame.ipa

I put a sleep in there because sometimes when I uninstall the device blanks out for a few seconds, but sometimes it doesn’t and works fine. Anyway, I’m using this script to dramatically increase my device testing time. Good work Adobe!

The Flash Apocalypse hello Corona & HTML5!

It’s the beginning of the end for Flash. Steve Jobs had predicted the future and there is no future for it. Sure, they may say everything is fine, it’s just the mobile plugin, but the mere announcement has spelled the end. Just like announcing that Pepsi is getting out of the soft-drink part of their business. What would investors do the next day? It will all go downhill (not molehill) from here, it is a Flash Apocalypse. The zombies will be all the former Flash programmers wandering aimlessly with no work and not willing to adapt. The roaches survived the blast and can adapt to new tools and languages. All the big companies, consultants and script kiddies and now soiling themselves, whining that they have to learn something new. Like me for example. But fear not, there are alternatives out there that boast even easier programming languages, and two HTML5 game creators that require no programming, there is a light at the end of the tunnel.

Corona SDK uses the Lua programming language and has a great track record so far, and almost daily updates of new builds. New features popup every day, your app can keep up with the times. Their apps have earned top spot in various appstores, and they are growing more and more.

HTML5 is what Steve Jobs predicted would take over, shall we doubt him again? There are two HTML5 game creator tools that I found while researching called GameSalad and GameMaker HTML5 are in the mix. They boast NO programming, where you can run actors through a logic flowchart. And it looks like they will compile native to mobile devices too. The advantage over Corona is that these games will also be playable on the web, a big plus for advertising revenues.

So put away your tissue box and toss those AS3 books. It was fun while it lasted, but it’s time to move on. We don’t know who will win yet, so go with your gut/research and pick a side. You still have faith in Flash? Try Corona SDK? Or take a risk on HTML5? All will cost you the learning curve and your precious time, but you have no choice. In the Flash Apocalypse, are you the zombie or the roach? 🙂