Monday, March 26, 2012

AIR 3.2 – Making an Endless Runner with Stage3D (Part 1)

With the introduction of AIR 3.2, Adobe has brought Stage3d to mobile devices. This means that flash developers can now leverage direct GPU Acceleration on Mobile Platforms (Android and iOS specifically). While this obviously enables 3d games, it’s also totally a huge boon for 2d games! There are already several 2d frameworks you can choose from which make the gpu quite easy to work with:
My personal favorite right now is ND2D.  So I thought it would be cool to take a look at how you might build an Endless Runner style game with this framework!

Files & Demo

Before we get started here’s some downloads to help you follow along:

Overview

The core classes which will make up this demo are*:
  • Game.as – Root display object, instantiates the other classes, and manages property injection
  • Background.as – Handle parrallax scrolling bg
  • Foreground.as – Handles ground tiles
  • PhysicsManager – Simple Physics engine, processes gravity and collisions
  • PlayerManager – Control Player animations and Keyboard controls
* Note: I’ve never actually built this type of game before. So, my approach may have some issues. However, this is about my 3rd iteration, so it should be ok ;)

Hello World2D

The first step to setting up ND2D is to create your World2D, and assign it an active Scene. In this example we’ll have just one Scene, our main Game: [...]
Read more: AIR 3.2 – Making an Endless Runner with Stage3D (Part 1)

No comments:

Post a Comment