Move with the Keyboard, Aim with the Mouse

by Michael Williams on June 25, 2009 · 7 comments

in Avoider Game, Tutorial

Would you rather have more freedom of movement or shooting?

Snapshot_O09.png
Click to play. Arrows to move, mouse to aim/shoot.

This is the complement to Move with the Mouse, Aim with the Keyboard, not surprisingly, which in turn is part of my mini-series on creating a shoot-’em-up. It’ll probably be easier to follow this if you’ve read the rest of the series already, but if you want to jump right in here and try anyway, you can download all the files you need here.

[click to read on…]

{ 7 comments }

In Handling Basic Animation with a Divided Timeline we added animation states to a game’s characters by splitting each of their timelines up.

Now let’s take a look at the second method for handling animation in Flash games: using one MovieClip for each animation state.

If you didn’t follow the divided timeline tutorial, I recommend reading through it to get some idea of what that method involves. That goes double if you’re a little unclear on how to deal with animation in the first place; I’ll just skim over those basics in this post.

Just as in the last tutorial, I’ll start from a game that has no animation — so if you’ve already added animation using a divided timeline, you might want to revert to an earlier version of your FLA for this. The game I’m going to use is (as usual) the one from my AS3 avoider game tutorial, and you can download all the files I’ll be using from this link.

Here’s what it’ll look like when we’re done:

Snapshot_O06.png
Click to play

[click to read on…]

{ 6 comments }

Back in February I wrote Part 7 of my avoider game tutorial, which introduced keyboard control. I made a pretty big mistake without realising, accidentally allowing the player’s avatar to move outside the screen and thus avoid all of the enemies with no effort at all.

Once this was pointed out I figured it was no big deal; I could add it in as a “challenge” with a few hints, and let readers figure it out themselves. Maybe later I could write another tutorial explaining how to correct this.

This was another big mistake ;)

[click to read on…]

{ 5 comments }

This is a follow-up post to How to Use the Flash IDE as a Level Editor. If you haven’t read that yet, check it out first!

Now that our code can detect the layout of symbols we’ve positioned using the IDE, we can separate levels’ layout from their appearance.

Why bother? Here’s a few reasons:

  • We’ve designed level layouts, but not the artwork to go with them.
  • There may be different people handling the art and the level design.
  • We might want to keep the same game but alter the appearance for different websites

Plus, once we’ve put the work in, other benefits will appear; I’ll show you some of these in this post.

First, let’s look at using this to experiment with different “themes”.

[click to read on…]

{ 5 comments }

Handling Basic Animation with a Divided Timeline

June 3, 2009

Beginner’s guide to animating your Flash game’s characters. Part one of a mini-series.

13 comments Read the full article →

How to Use the Flash IDE as a Level Editor

June 1, 2009

Learn to use the Flash CS3 or CS4 IDE as a level editor for your AS3 games.

9 comments Read the full article →

Move with the Mouse, Aim with the Keyboard

May 28, 2009

Only being able to shoot in one direction is soooo 1978. Let’s add three more to choose from. (Based on my Avoider Game Tutorial)

4 comments Read the full article →

Six Great Free Flash Extensions

May 24, 2009

List of my favourite Flash extensions, with a summary of what each does.

7 comments Read the full article →