That screenshot above is an important test project – I finally got stage3D working on iPhone! Which means, hopefully, I’m one step closer to getting Super Hexagon working on iPhone. Which is not necessarily where I want the game to end up, but I figured (since it’s supposed to be technically possible with flash now), it would be fun to at least try it and find out how it feels.
Anyway, getting Stage3D to work on an iPhone took a LOT of messing around, more than these sorta things usually take, and I had a lot of trouble finding recent information online on how to do it – so, I’m going to be a good interneter, and write a short tutorial, for future googlers who might have to go through this horrible process. Here goes:
I’m using FlashDevelop 4.0.4 RTM on windows, and I’m compiling with AIR version 3.2. All of the following assumes that you’ve already got a basic flash project working on an iPhone. If you haven’t, this isn’t the right tutorial for you. (try this one!).
Stage 3D doesn’t work with AIR 3.1, and I wasn’t able to get it to work with 3.3. If you don’t have AIR 3.2, you should be able to get it by just reinstalling the latest version of FlashDevelop. So, set your projec to target AIR Movile 3.2 under Project -> Properties -> Platform.
Next: this is the bit that tripped me up for a while: there’s an application.xml file in the root directory of your project. At the top of this there’s anoter line to select your version of AIR. Make sure that’s also set to 3.2, like this:
Next, for Stage3D to work, you need to pass an additional compiler option. Under Project -> Properties -> Compiler Options, add the following under “Advanced Compiler Options”: “-swf-version=13″.
Under Project -> AIR App Properties -> Initial Window -> Non-Windowed Platforms, set the Render Mode to “Direct” (NOT GPU, like you might assume).
Once you’ve done that, the final bit is to edit application.xml again. There are a bunch of settings under “initial window” here – add the following to this:
That should be everything! Good luck!