Archive for the 'Tutorial' Category

Status: AS3.0 game programming tutorials

September 19th, 2007 | Category: Actionscript 3.0, Game Programming, Tutorial, Flash, Left-Brain, Daily

I had a query regarding the game programming tutorials I’ve been working on. The query is “Where the heck are they?”

Here’s a quick status. I would like to have the game completed before I posted the rest of the tutorials. However, due to some unforeseen circumstances the actual game itself is held up (it’s 94% finished, just hung up getting some animations done).

I’m a little split on if I should go ahead and continue the tutorials with the game as-is, or if I should go ahead and wait for a polished product to deliver to you guys.

What would you guys prefer?

LB

3 comments

Actionscript 3.0 Game Programming - Part 2 - The Tools

August 19th, 2007 | Category: Game Programming, Actionscript 3.0, Tutorial, Flash, Left-Brain

Welcome back. Today I’m going to give you a brief overview of the tools that I am using for developing a game in Actionscript 3.0. I’m also going to throw in a bonus paragraph or two and describe Quacker Whacker in more detail as I should have done in Part 1.

There are, of course, options for everything, but the tools I seem to have settled on are Flexbuilder 3.0 beta (free public beta until release, Flexbuilder 2 is fine also), Adobe Flash CS3, and Adobe Illustrator CS3 and Photoshop CS3(sort of, I’m very novice with the last 2).

Flexbuilder is my IDE, it’s based on Eclipse (my personal favorite) and does most of the nifty-cool things that an IDE should do; code highlighting, in-flight error checking, running the app, full debugger, etc. The one thing is doesn’t have, that I have been able to find is snippets - the ability to attach some tedious, often used bit of code to an expandable abbreviation. All of the Actionscript coding is done here, along with your frequent testing and debugging. It is NOT necessary to use Flexbuilder to create Flex or Actionscript applications, the Flex framework is free and contains command line compilers. However, the how-to on using the command line stuff is beyond the scope of this article and is covered heavily in other books and sites.

The 2nd piece of the puzzle is Flash itself. I know. . I know, in the intro article I said that is what I was trying to avoid. The reason I wanted to avoid it though is because it’s not designed for programmers to create large amounts of code. It was, however, created for animators and graphics geeks to do what they do best, and in that, it excels. So, yes, I do use Flash, but I’m only using it to create my animated assets which are then imported in the game as objects that I am free to instantiate and use as I see fit. It’s really very cool. I’ll be covering how to create an asset in Flash, export it to Actionscript, and using it in the game (from a very novice graphics standpoint).

The final tools mentioned are Adobe Illustrator CS3, and Adobe Photoshop CS3, and mentioning them is about all I’m going to do. If Mr. Right-Brain is interested in doing an article on them I would encourage that. But I’m very much a novice and would probably do you more harm than good ; ) They are being mentioned, however, as these tools, or tools like them, are very important in this process for making really super-duper graphics, especially when you start making games that you want the public at large to enjoy. Typically the base graphic assets would be created and tweaked with these applications before moving them into flash for animation.

So, those are the tools in a nutshell. Now for the bonus material. What is Quacker Whacker?

As I mentioned in the intro article, Quacker Whacker is a knock off of the old Galaga/Space Invader type games. There’s a formation of ducks that fly across the screen. While making this journey they have the potential to poo or to drop eggs. The hunter is at the bottom of the screen and is able to shoot the ducks with one of 3 types of rifle, semi-automatic, automatic, or shotgun. If the hunter is hit by a poo, splat, he loses a hat (life). If the hunter catches an egg, he is gifted with a bonus. . .score, new gun, ammo, extra hat (life), etc. When the flock goes off one side of the screen, the flock will drop down a bit, turn around and cross the screen in the other direction. The hunter gets bonus points when he shoots the entire flock. The earlier he does this, the higher the bonus. Finally, it’s not implemented yet, but there are plans for a Hawk that will dive at the hunter. The hunter must shoot the hawk or be got by it. There will be a large bonus for shooting the hawk. That’s the basics of the game.

That’s it for this installment. Join me again next week when we will discuss the basics of creating a game. The various screens, game manager, game loop, etc. There will be code (finally)!!

See ya then!!

1 comment

Actionscript 3.0 Game Programming - Part 1 - Introduction

August 11th, 2007 | Category: Game Programming, Actionscript 3.0, Tutorial, Flash, Left-Brain

Adobe Flash content. . .it’s everywhere. Can’t hardly look at a web page without seeing some, and it makes up an astounding chunk of the casual games market. It’s installed on damned near every single individual’s machine, and it’s kept current by the Flash update mechanism. It’s been around forever, had very few problems (that I’m aware of), and is just about universally trusted as an interactive content delivery mechanism (as well as loathed as an ad delivery mechanism . . .who cares how many bananas I can peel for a free iPod? hehe, whatever!)

This, friends, is obviously the place to be if you want to create software in the casual games space. However, there is one BIG historical problem. Creating games in the Flash application, via the time-line concept, is not very intuitive for us “real” programmer types if not down right confusing*. It’s definitely something that’s easier for the designer types, and has provided them with incredible opportunities to break into that space. However, times are a-changin’. With the introduction of FlexBuilder 2.0, Actionscript 3.0, and Flash CS3, us software engineering types can finally get into the game with gusto. And let me tell you something. . .I, for one, am LOVING it!

So, I guess I’m going to try and share the love a bit. I’m just about finished writing a game called Quacker Whacker. It’s a loose and wholly silly take off of the Space Invaders/Galaga platform games and was conceived and created strictly as a learning project for this technology. The goal was to do it strictly as a coding (AS3.0) project, not a bunch of Flash, etc. I have deviated from this a bit and used Flash to develop my animated assets. Flash is NOT necessary, but I think it’s a very strong and complementary tool in this context. I think as we go on, you’ll probably agree.

In these tutorials I will cover a number of topics that are specifically related to this technology. It is not my plan to get into good game design (which this game doesn’t demonstrate anyway : b), coding practices, how to create the Flash assets (aside from what’s important with this specific set of tools), etc. This tutorial will not be a 0-100 walk-through of creating the game. However, I will be providing complete sources (code, and assets), and the game itself will be available to check out.

I think that pretty much wraps up the introduction. It is my intention to post a new section of the tutorial at least once a week for the next 3-4 weeks. The next section to come next week will look at the tools we’re going to be working with, including: FlexBuilder, Flash CS3, and Illustrator.

LB

P.S. If there’s something you are interested in seeing in the tutorial, let me know. I don’t have it completely developed yet so there’s room for additions and now is the time ; )

* I know I’m leaving out some technologies that allowed you to programatically build flash content. But I’m pretty much a stickler for standards personally. So I just never totally warmed up to them.

4 comments