Wednesday, March 14, 2012

Build a Stage3D Shoot-’Em-Up: Interaction

This entry is part 2 of 2 in the series Build a Stage3D Shoot-'Em-Up
In this tutorial series (part free, part Premium) we’re creating a high-performance 2D shoot-em-up using the new hardware-accelerated Stage3D rendering engine. In this part, we’ll extend our rendering demo by adding an animated title screen and menu, music and sound effects, and a keyboard-controlled ship that can fire bullets.


Final Result Preview

Let’s take a look at the final result we will be working towards: a hardware accelerated shoot-em-up demo in the making that includes an animated title screen and menu, sounds, music, and keyboard controls.
Click the logo to gain keyboard focus, then use the arrow keys to move and space bar to fire. Your shots will be reflected back at you once they reach the edge of the screen.

Introduction: Welcome to Level Two!

We’re going to continue making a side-scrolling shooter inspired by retro arcade titles such as R-Type or Gradius, in AS3, using Flash 11′s Stage3D API and the freeware tool FlashDevelop.
In the first part of this tutorial series, we implemented a basic 2D sprite engine that achieves great performance through the use of Stage3D hardware rendering as well as several optimizations.
These optimizations include the use of a spritesheet (or texture atlas), the creation of an entity object pool which reuses incactive entities instead of creating and destroying objects at runtime, and a batched geometry rendering system which draws all of our game’s sprites in a single pass rather than individually. These optimizations are the perfect foundation upon which we will build our high performance next-gen 3d shooter.
In this part, we are going to work toward evolving what is currently a mere tech demo into something that is more like a videogame. We are going to create a title screen and main menu, add some sound and music, and code an input system that lets the player control their spaceship using the keyboard.

Step 1: Open Your Existing Project

If you don’t already have it, be sure to download the source code from part one (download here). Open the project file in FlashDevelop (info here) and get ready to upgrade your game!

Read more: Build a Stage3D Shoot-’Em-Up: Interaction

No comments:

Post a Comment