Accessibility

Train Simple videos: Introduction to Flash game development

Train Simple

Jiro Ietaka

Large Animal Games

The following videos are excerpts from Train Simple's Flash 8 Game Development online course and DVD hosted by Jiro Ietaka. Jiro takes you through the necessary steps to build a Flash-based game with extensive use of Flash ActionScript 2.0. The course focuses on the key elements of game development such as parallax scrolling, character movement using trigonometry, dynamically loading enemies via XML, and adding sound to the game.

The following eight tutorials are taken from Lessons 2 and 4. Lesson 2 focuses on character movement based upon user input, while Lesson 4 uses basic physics to animate the enemy characters. To see what kind of game this series of lessons builds, play the game below:

Requirements

To follow these video tutorials, you should install the following software:

Flash Professional 8

Character movement

The following video tutorials cover movement using onKeyDown and Key.isDown, and adding acceleration to a game.

Movement using onKeyDown

At this point in the course, Jiro has already discussed parallax scrolling to animate the background and foreground elements within the game. The focus of this movie is to get the hero ship to move based upon input from the user's keyboard.

Movement using onKeyDown

Figure 1. Movement using onKeyDown

Movement using Key.isDown

This movie continues the discussion of character movement. In the lesson movie, Jiro makes the ship move by changing its position every time the Key object receives an onKeyDown event. Since this results in erratic movement, Jiro explores how to use the enterFrame event to produce smoother motion.

Movement using Key.isDown

Figure 2. Movement using Key.isDown

Acceleration and velocity

Continuing on the quest of making fluid, life-like motion, Jiro provides you with a brief overview of acceleration and velocity.

Acceleration overview

Figure 3. Acceleration overview

Adding acceleration

After reviewing the principles of acceleration and velocity, in this movie Jiro adds those concepts to the movement of the hero ship.

Adding acceleration

Figure 4. Adding acceleration

Enemy movement

At this point in the game, Jiro has added enemies to the game. The enemies are being dynamically attached to the Stage based upon information being loaded from an XML file. The XML file specifies what enemy of four possible enemy types to load.

Simulating gravity

In this movie, Jiro explores how to simulate a gravity effect. He discusses this topic in theory and applies the theory to a generic object outside the game. Later he will look at how to apply these concepts to one of the enemies within the game.

Gravity overview

Figure 5. Gravity overview

Creating a bouncing enemy

In Lesson 3 of the DVD course, several functions were written to handle the loaded XML data and, in turn, display the appropriate enemy on the Stage in the proper location. In this movie, Jiro adds the required code to animate one of the specific enemies, the Bouncer, with the effect of gravity.

Creating the bouncing enemy

Figure 6. Creating the bouncing enemy

Trigonometry primer

Now that the Bouncer enemy is animating properly, you're ready to move on to the next enemy. The next enemy you want to animate is one of the spaceships. The goal is to animate this ship so that it bobs up and down. In order to achieve this effect, you must use trigonometry, so in this movie Jiro provides you with a quick overview of that subject.

Trigonometry primer

Figure 7. Trigonometry primer

Applying trigonometry to animation

In this movie, Jiro takes the concepts discussed in the last lesson and applies them to a MovieClip object to create realistic movement.

Applying trigonometry to animation

Figure 8. Applying trigonometry to animation

Where to go from here

For more information about Flash animation and game development, check out these resources:

You can also take the full Flash 8 Game Development class on the Train Simple website, either as part of their online training subscription service or for purchase in DVD-ROM or CD-ROM format.

About the authors

Train Simple is an Adobe Certified Training Partner offering video-based training for Adobe applications delivered over the web and DVD-ROM. The full Flash Media Server 2 training product offers comprehensive lessons and tutorials for building Flash-based applications. Train Simple also offers live, hands-on classes on the East and West Coast of the United States.

Jiro Ietaka has been a professional Flash and Director developer for the past 10 years, focusing now on designing and producing games. He is currently the senior designer at Large Animal Games, a casual game developer in New York. Prior to that, Jiro worked as the senior game producer for Kids' WB!, the cartoon block of the WB Television network, where he developed over 30 games and activities for KidsWB.com. He has also worked in Los Angeles as a media director for IBM and as an instructor at Train Simple. Some of his most notable games include IT Defender, produced for Fortify, and Jackpot Match-up, recently released from Large Animal Games.