This is a quick and dirty tutorial on converting your Flash game to Adobe Air. Android apps are also covered in the tutorial, however, I’d like to point out that FlashPunk does not perform very well on mobile devices (at least not without some tweaks).
Export game for Android and IOS...how?
Don't Even Odd - our first math game
I’d like to make a note here that another FlashPunker got FP working with Starling. The framework is a little different than FP, but not radically different where it will be like learning a whole new API.
I did a simple test and found that it runs at ~60fps with 100 sprites on screen, parallax backgrounds, and additive blending on my Droid Razer Maxx. I’m still waiting on the iPhone to arrive, so I cannot report on iOS performance just yet. I’ve also forked the repo and started on my own additions and optimizations as I’m currently working on a game for iOS devices.
have you add some new features?
At this point I’ve only added a backdrop class and off-camera culling. We’re still waiting on an iPhone to see how well a sample project runs before moving forward with it, but I’m fairly certain it will run well since it runs at almost 60fps on my Android.
what is off-camera? :0
Any entities not on the camera are not rendered, which helps boost the performance a bit.
Woah… do off-camera
Entity objects really render in the current build of FlashPunk? That sounds like a good thing to optimize.
It still renders the entities off camera.
I forgot to post back here about the iOS tests.
We tested Starling/Starling punk on a 4th gen iTouch and the performance was terrible. It seems only the most recent devices can run it at a decent frame rate.
We decided to use Monkey which translates “monkey-code” to a target’s native language, which gives us the speed we want since we aren’t dealing with JIT compilation of Adobe Air. I’m currently porting FlashPunk over and will definitely post a link on the forums once its all in working order! From our early tests, we had 100 Entities on screen with parallax backgrounds running at a solid 60fps.
Do you have any specifics about Starling/StarlingPunk performance on the iOS devices?
With a simple demo with parallax backgrounds and 100 entities with alpha blending, we were getting ~7 FPS on a 4th gen iTouch. However it was running fairly well on my Droid Razor Maxx, but it is a much newer (and more powerful) phone.
In retrospect, I’m not sure if it was how StarlingPunk was setup or if it was simply Adobe Air.
Thanks for the data! It’s very useful. How large were the entities, in pixels, and did they all share the same sprite sheet or was it different sheets?
The iPod Touch 4th gen has an 800mhz CPU so I’d expect performance to be on the low end of the scale, but not quite that bad. I’d still expect Stage3D to manage around 30fps with 100 entities, especially if they are small (<128x128px) and have efficient sprite batching (less than 20 draw calls).
I actually was not using the same sprite sheet (or texture atlas) which was probably the biggest problem
Absolutely, when working on mobile and using Stage3D the importance of ‘good batching’ cannot be overstated.
I’ve sent you an email.