- Conquer the Universe With ActionScript 3.0 and the Flixel Game Engine: Part 1
- Conquer the Universe With ActionScript 3.0 and the Flixel Game Engine: Part 2
The Flixel game engine is an opensource ActionScript 3.0 framework written by Adam Atomic. Its aim is to take the donkey work out of building AS3 games, leaving you with all the fun stuff and saving heaps of time!
In this, the first in a series of two screencasts, Shane Johnson takes you through the basics of Flixel, explaining how to build an awesome shoot ‘em up game from scratch.
View Screencast: Section One
Introduction
Get the Flash Player to see this player.
View Screencast: Section Two
Begin Coding
Get the Flash Player to see this player.
View Screencast: Section Three
Moving on; Sprites and Sounds
Get the Flash Player to see this player.
View Screencast: Section Four
Shooting, Killing and Compiling
Get the Flash Player to see this player.
Tags: Videos


XML Photography Template V2 only $40.00 
Year, super old school galaga-stuff!
I like this retro arcade-shooters.
COOL!
Holy actionscript, batman.
Good stuff, complicated looking.
The final result of your tutorial is EXCELLENT! Let me try to do it! Congratulations.
Great Tutorial.
Well explained.. i’m waiting for part II
thanks
Great tut and even better that its a video. So much easier to follow than the written ones.
Just great. This is genius old school.
Keep going just like this.
Regards.
Hmm..without watching the screencasts (i don’t like screencasts much…you can’t skip “to the content” :) ) just by “trying” the demo i’ve noticed a problem with the movement. You can go to only one direction at a time which makes it quite harder to evade the other spaceships. If it is not intentional is it “engine” problem or else ?
Hey we wouldn’t want to make the game too easy…….
The movement of the player is controlled by an ‘else if’ statement meaning only one key can be pressed at a time but this can easily be changed to a simple group of ‘if’ statements like so:
if(FlxG.kLeft)
{
acceleration.x -= drag.x;
}
if(FlxG.kRight)
{
acceleration.x += drag.x;
}
if(FlxG.kUp)
{
acceleration.y -= drag.y;
}
if(FlxG.kDown)
{
acceleration.y += drag.y;
}
:D
This code looks awesome as i would rather have diagonal movement….
Thanks Shane!
Wouldn’t you rather avoid glitches? if you push up & down at once, it will probably result in a waste of processor arithmetic power! =D
if(FlxG.kLeft)
{
acceleration.x -= drag.x;
}
else if(FlxG.kRight)
{
acceleration.x += drag.x;
}
if (FlxG.kUp)
{
acceleration.y -= drag.y;
}
else if(FlxG.kDown)
{
acceleration.y += drag.y;
}
^ This is prolly really incorrect formatting, but hey, you get the point…
I like :D Maybe next time a game about gravity? Like a sort of flying game were you have to make sure that the object stays as long as possible in the air? :)
Nice job, I was looking at the PushButton Engine but this is much more fun. The only thing i found is FTD gives me trouble with mimeTypes of the assets.
yeh!!!!
amazing tut :-))))
thanksss
WOW! This game is awesome……
I am making a game out of this……
will post it here once it is finished so everyone can play :)
its aweeesooooome!
Hi would you be able to link the source code for Flixel at the time you created the tutorial because it does not work with the latest build.
Thanks
Hi Yes this was done with flixel 1.25
you can download it from my server here: httP://ultravisual.co.uk/blog/sourceFiles/flixel_v_1_25.zip
When I have a chance I’ll up date the source files for this tute to work with the new version on github
Shane
Is that github link coming any time soon? I realize you’re probably too busy for this. Just curious.
Thank you very much :)
it’s not working! When i open the demo page shows only white flash box!
Great tutorial thank you !
I’m trying to find the software “sfx” you are talking about but there are so many softwares called like this and I never find the good one… Could you give me (us) the link?
sfxr?
Original version here.
Flash/AS3 port here.
“Sfxr” right, thanks a lot Micheal!
You say in your tutorial that you are creating a game “from scratch” but you’re using flixel… ?
where the FLA file in source download??
only action script what about animation and charecters?
lol
I’ll definitely try. Thank you very much for the tutorial.
A bit old now, but I was trying this (with FlashDevelop). First difference: FD automatically generates a “Main.as” class file in the root of the source folder. When compiling as is, even after making StarShooter and MenuState, it loads a blank flash window.
Then, when I try to run StarShooter from Main, it gives me this error:
shoot\src\com\shoot\shoot.as(11): col: 29 Error: The definition of base class FlxGame was not found.
public class shoot extends FlxGame
I tried putting the flixel stuff in a folder order that matches its internal packaging, but that didn’t help.
Any help?
By the way, I used StarShooter in my comment for ease purposes. My class name is actually “shoot”.
Hi Shane –
great tute mate
I’m currently hacking the code for later version of Flixel, having a few issues… how are you going on this?
I have found this tutorial very helpful and indeed I have been able to understand the flixel game building process. It would be very nice to see an updated version to take advantage of the newer flixel game version. I have found great difficulty in making this game work using Flash Builder 4.6 as I was not able to find an older version of FDT3 as I am sure this would have made the difference in proper function.