The last few weeks I’ve been busy with a fun new little project: A mobile game for Android and iOS. As you might remember, this isn’t the first time we talk about using Flare3D on mobile devices, but back then it was a quick proof-of-concept port of YellowPlanet using Flare3D 2.0.48 running on an iPad 2.

FingerAttack-screen2This time, however, things are a little different: I’m using bleeding edge builds of the much awaited Flare3D 2.5 and my target device is way less powerful. The idea is to get a complete 3D game running smoothly at 30 FPS on a Motorola Droid 2 smartphone. We realize that this device is a little old and underpowered, but that’s pretty much the idea, to push our code to the limits. After all, if we get it to run properly on this device, it should work great on anything more powerful. So, challenge accepted! 😀

The idea is to share here in the blog different aspects of this project from time to time and for this first installment, I’ll talk a little about what the project is and what are the main challenges that it presents: The idea is to make a vertical space shoot’em up with full 3D graphics, background music and sound effects. The game must feature enemy squadrons attacking you, plenty of bullets and animated explosions all around. But one picture is woth a thousand words, or so they say.

So, a few topics I’d like to talk about:

  • Asset creation and management: As you can see, there are enemies, different kinds of bullets, the player ship, background geometry and explosions. Since loading and setting up all that stuff can take some time on mobile due to hardware constrains, we have to be very organized and avoid any kind of loading during gameplay.
  • Multiplatform development: Even though the Flash and AIR platforms excel at portability, there are still things to consider like screen resolutions and aspect ratios. We’ll show you how to handle these topic as painless as possible.
  • Lots of collisions! It isn’t just between enemies, bullets and the player, it’s also possible to collide against some of the background elements. Since 3D collision detection can be expensive, specially on mobile, so we had to figure out a more lightweight approach.
  • We want the game to look as good as possible while mantaining a smooth framerate. Animated explosions, scrolling backgrounds and shiny ships / structures, we make use of some FLSL magic to make everything pretty and fast.
  • Object pooling: We must be able to create and destroy items all the time while using as little CPU power as possible and keeping memory activity controlled. We really don’t want the garbage collector affecting our precious framerate.
  • Manual drawing. In order to have more control and flexibility in some situations, we need to draw some objects by hand instead of just adding them to the scene. We’ll show you why this can be useful in certain situations and how it’s done.
  • There are a few more topics that I’d like to talk about but, for the time being, this should give you a general idea of what you’ll be getting each week. Stay tuned for more! :)