2009/10/08

Where to Start with AS3, FlashDevelop and Flixel

the free tools of the trade...

I've been working with Flash for a few years now. But I didn't switch over to programming with ActionScript 3.0 until earlier this summer. And I have to say, I've found AS3 to be so much easier to work with than AS2. I'm glad I switched.

Here's where to start if you want to make Flash games with AS3. If you do it this way, it's all free, and you don't need any prior experience with programming, or Flash.

If you forget everything else I'm about to tell you, just remember these two words:
  1. FlashDevelop

    (it turns code into programs)


  2. Flixel

    (it helps you make game code)

These two things, together, make up the path of least resistance for free Flash game development. You are not going to find an easier way to do it anywhere else. Believe me. I've tried.

So, where do you start?

Step 1: FlashDevelop

so shiny...

Start with the Making Games in ActionScript 3 using FlashDevelop tutorials! They'll tell you everything you need to download, how to install it and get it all set up, and walk you through all the basics of a typical Flash game.

Here they are:
They are very gentle, but I can imagine that someone who has never done any programming before may get confused somewhere along the way.

This tutorial will assume some basic familiarity with object oriented programming, a graphical tool of your choice and general computer literacy.

If you have any questions, you are welcome to post them here - I'll do my best to help. :)

But first, I'd recommend having a look through the Understanding Classes in AS3 tutorials!

If you’re stuck in an ActionScript 2 rut, or you’re new to ActionScript 3 and it’s blowing your mind, this should help ease you in a bit better.

Here they are:
If you already feel comfortable with classes and objects, you can skip these. They're optional. But they're worth reading if you haven't done much object-oriented programming before.

All right.

Have you gone through the Making Games in AS3 tutorials? Have you gotten FlashDevelop all set up, and maybe made a simple program or two?

If not, then go back and do it!

If yes, then you're ready to move on to the next step! :D

Step 2: Flixel

so pixelicious...

Don't bother making games from scratch. Make them with Flixel.

flixel is a completely free collection of ActionScript 3 files that helps organize, automate, and optimize Flash games; an object-oriented framework that lets anyone create original and complex games with thousands of objects on screen in just a few hours.

Oh yes.

It's the same game engine that was used to make Canabalt.

Start by downloading the latest version of Flixel, then follow these instructions to get a something showing up on the screen. If it works, download this example game and follow these quick instructions to run it:
If you can get the example game to work, you can move on to these two step-by-step tutorials on how to build a game from scratch using Flixel:
Then you can try this more in-depth tutorial on how to make a spaceship shooting game from scratch using Flixel:
Follow along, and by the end of it you should have three little action games and the knowledge to start building your own games with Flixel!

To help you in your journey, there is the Flixel documentation, the Flixel wiki, and the help forum where you can ask questions and find answers. Also, the Flash Game Dojo. And of course, Google is always helpful.

If you get tired of using Flixel, for some strange reason, and you want to build your own game engine, you can give this tutorial a try. For experts only!

Update:
Flixel has changed a lot since I first wrote this post, so I recommend you check out this more recent guide on How to Learn Flixel if you're just getting started now.

Lastly, here are a few tools that may come in handy.

Unless you're making games for blind people (which is awesome) you'll probably need some way to make graphics and animations for your games. I'd highly recommend using the free image editor Paint.NET for this purpose. It's great for pixel art, and easy to use despite having a lot of nice features in it.

Similarly, you'll probably want to have sounds in your game. For general sound recording and editing, try the free sound editor Audacity. Again, it's easy to use and is capable enough for recording and modifying sounds. I use it mostly to clean up recordings or save sounds into different formats and file sizes.

If you're not interested in recording your own sound effects, you can generate them, with the amazing free tool called sfxr. Just click a button to get a randomized game sound, or change the settings manually to get the sound you want. It's perfect for games.

The creator of sfxr has also released a free tool for making game music, called musagi. I haven't tried it yet but I hear it's pretty good.

There are quite a lot of nice, free tools out there if you know where to look. Here's one list that you might find useful.

That's all I have for you! Now go make some awesome games with FlashDevelop and Flixel. And let me know how it goes. I'm here if you have any questions. :)

Good luck!

15 comments:

Jordan Magnuson said...

Super post Axcho! Thanks a lot. I've been thinking about getting into Flash for a while, and this post may be just the motivation I need.

axcho said...

Thank you! I hope you have fun learning Flash. Keep me posted on how it goes. :)

xraven13 said...

Thanks man, i found many useful information in your post =)

axcho said...

You're welcome. :) Thanks for letting me know!

Anonymous said...

Unfortunately Seifer Tim's Basic Game Tutorials aren't loading. I also can't seem to get an image to move. While it seems it has good intentions, the links you give aren't very good. One in particular, the "Running Mode in FlashDevelop", didn't help me at all. I tried running it following his steps, but there were two errors. When I tried to fix those, I got five errors. I followed his instructions step by step and I couldn't get it to run. Likewise with the MGAS3FD links. They tried to get me to be able to move an object but the stupid gnome wouldn't move. I figured I'd save time and just post all the problems here. I'm also going to post on the MGAS3FD place but I wanted to let you know about my problems. Please help me, I really want to start making games.

axcho said...

Hmm, it seems that many of the resources I've linked to have gone out of date. I had suspected this but had not fully admitted the fact until you let me know. Thank you, BloggerJim, and I'm sorry.

Recently, as I've also mentioned in my most recent blog post, I've started teaching a class on this subject, based on this guide. And in doing so, I've realized how much information is still left out, and how much beginners struggle to accomplish what seem like simple things to those who have had more experience in this area.

After the class ends, I may write my own tutorials based on my experience. There is certainly much room for improvement in this area, on the web. And I'm sure there are a lot of people who could benefit from such guidance.

In the meantime, you can post specific questions and I'll do my best to answer them.

Also, if you are completely new to making games, I'd highly recommend going through the free content at Gamestar Mechanic, a recently launched MMO that teaches you basic game design. They have a simple game creation tool that would be good for practice, though you can't use it to make standalone games. The free quest that is currently available took me about three hours to complete.

Try that first and let me know how it goes. :)

Anonymous said...

It was pretty fun. The editing was really easy and it would be really good if I could make independent games. When you finally update it, would you mind e-mailing me at james_ringel@yahoo.com? I do appreciate you making this though, it helped get me started at least.

axcho said...

Cool, glad you liked it. And yeah, the big downside of Gamestar Mechanic is that you can't make standalone games with it - and even if you could, you don't own any of the content you create there, according to their terms of service!

One promising alternative that is still in development is Stencyl, which can be used to make standalone Flash games that run with the Flixel engine. It hasn't been publicly released yet, but you can sign up for the beta if you're interested.

Anonymous said...

I've signed up for the beta, but I haven't gotten any notice from them otherwise. Thanks for trying to help. I'm also looking for help on other sites, but I'll be sure to keep up with the news here.

axcho said...

Hey I found some nice-looking tutorials that should work with the latest version of Flixel. Posted the links. Try them out and let me know what you think. :)

SecurityProMan said...

Hi there - I'm at the stage where I extract the mode folder and the org folder into the source directory of the mode project, and I'm getting compile time errors that I have investigated:

In BotBullet.as and Bullet.as, it says that there is no need to override the hitSide function, so I changed that and it worked out.

The next one I'm stuck at - it says that in PlayState.as, it calls the method createSprites through _littleGibs and _bigGibs, and it passes 6 parameters each time, but the compiler saying that the method only calls for 5. So I opened the FlxEmitter.as, and in that function definition for createSprites, there is in fact only 5 parameters. So I couldn't really figure out why there are 6 passed in Playstate.as?

Maybe the .as files in that Mode directory were meant for an older version of flixel?

axcho said...

Sounds like an issue with an outdated version of Flixel. Thanks for letting me know - I'll try it out myself and see what the problem is...

axcho said...

SecurityProMan, I finally checked it out myself and it was an issue with the version of Flixel.

I've updated the download link in my post to point to the "beta" version of Flixel, which is the newer one that Mode is built for. You can also download it here:
http://github.com/AdamAtomic/flixel/zipball/beta

Let me know if that works for you!

Herahadi A.N. said...

many many thanks and thanks again and again for this post.
since i just begin learning yesterday moving from as2 to as3 for developing games may be its better for me to try flashdevelop since its free.
oh.. almost forget.can i install flash develope and flixel on linux box??
thanks for your answer.

axcho said...

Unfortunately, FlashDevelop is Windows-only. But I think there are some command-line tools available for compiling AS3 programs on any platform...