Be a Supporter!

Flixel-Tutorial #1

Score:
rated 4.16 / 5 stars
Views:
58,234 Views
Share Links:
Genre:
Tutorial
Tags:
platformer
tutorial
learn
flixel

Credits & Info

Uploaded
Jun 9, 2013 | 4:34 PM EDT

If you liked this, check these out!


Medals

Log in to save your medals! Don't have an account? Create one for free!

A background! 5 Points Add graphics and the background!
First steps... 5 Points Setup flixel!
Louis Armstrong is singing! 10 Points Setup the tilemap!
Oblivion 10 Points Add the player!
Retro vibes 10 Points Add some sweet tunes and sounds!
Rigour 10 Points Add collisions!
Animator 25 Points Add animations to the player!
Tutorial finished! 25 Points Finish the tutorial!
We created life! 25 Points Make player move!

Author Comments

Hello!
Ever dreamed of making your own game? Well, now you can and it is really easy! It doesn't matter if you have experience on coding or not you will certainly master this tutorial and learn how to use flixel and to create a classic platformer. :)
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
Controls:
'X' - Action!
Mouse - Well...
'A' & 'D' or 'LEFT' & 'RIGHT' - Turn the page!
'S' - Open skill-levelselection
'C' - Open chapterselection
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
UPDATE: Thanks a lot for the frontpage and all the nice reviews! :)

As I checked the Tutorial-genre on Newgrounds for flixel tutorials I noticed there aren't any and only a few on developing ActionScript 3 games. Since I have already developed a few games with flixel and know about its benefits and how great it is to start making games I thought I could try making one myself for the Newgrounds community.

The game shouldn't be too complicated, easy enough so that even someone without any experience on ActionScript could understand it...

The tutorial isn't just boring text, but it's made in an interesting and entertaining way, using cool effects and a tune made by RealFaction, who also helped me with the development aswell as the nice beta-testers. The tutorial is available in 4 versions. One for people with none experience on coding, one for people with experience on other languages than AS3, one for AS3-developers and one for people who have already used flixel. So that everyone gets the information he/she needs. Not more and not less.

Here's the table of content:
*CHAPTER I - Setting up flixel with FlashDevelop
*CHAPTER II - Importing and adding graphics
*CHAPTER III - Creating and adding a tilemap
*CHAPTER IV - Creating and adding a player
*CHAPTER V - Collisions
*CHAPTER VI - Input and movement
*CHAPTER VII - Creating and playing animations
*CHAPTER VIII - Importing and playing sounds and music
*CHAPTER IX - Using the Newgrounds API to create medals and ads
*CHAPTER X - Conclusion and where to go from here

Not only will it show how to use flixel but also the benefits of the Newgrounds API and how to use it with FlashDevelop and how to add medals and ads. The tutorial will be completely free and will lay the fundament for 8bit-gamedevelopment with flixel. People will be able to go anywhere from here and make their retro dreams come true. If it catches enough people's attention there will also be a second part on creating enemies, guns, more levels and other cool stuff or whatever THE PEOPLE DEMAND! ;)

Cheers!

Reviews


GutnachtGutnacht

Rated 5 / 5 stars

I keep getting this error:
PlayState.as(17): col: 11 Error: Access of possibly undefined property Imgmap through a reference with static type Class.



minerandomminerandom

Rated 5 / 5 stars

package
{
import org.flixel.*;
import org.flixel.FlxSprite;
/**
* ...
* @author savage cabbage
*/
public class Player extends FlxSprite
{
}

public function Player()
{
loadGraphic(Sources.ImgPlayer, true, true, 14, 15);
acceleration.y = 300;
}
override public function update():void
{
velocity.x = 0;
var right:Boolean = (FlxG.keys.RIGHT || FlxG.keys.D);
var left:Boolean = (FlxG.keys.LEFT || FlxG.keys.A);
var up:Boolean = (FlxG.keys.UP || FlxG.keys.W);
if(touching & DOWN)
[
if (UP)
]
[
velocity.y = -50)
]
if (right)
[
velocity.x = 75;
facing = right;
if (x > FlxG.width - width)
]
[
velocity.x = 0;
]
if(left)
[
velocity.x = -75;
facing = left;
if (x < 0)
]
[
velocity.x = 0;
]
}
}
in player.as I wrote this code and it keeps giving me errors like these
Player.as(26): col: 5 Error: Syntax error: expecting identifier before if.
Player.as(26): col: 11 Error: Syntax error: expecting rightbracket before rightparen.
Player.as(29): col: 21 Error: Syntax error: expecting rightbracket before rightparen.
Player.as(33): col: 20 Error: Syntax error: expecting rightbracket before semicolon.
Player.as(36): col: 4 Error: Syntax error: expecting identifier before rightbracket.
Player.as(39): col: 4 Error: Syntax error: expecting identifier before rightbracket.
Player.as(40): col: 12 Error: Syntax error: expecting identifier before rightparen.
Player.as(45): col: 4 Error: Syntax error: expecting identifier before rightbracket.
Player.as(48): col: 4 Error: Syntax error: expecting identifier before rightbracket.
what is wrong with this code please help me if your reading this


People find this review helpful!
Schulles responds:

Hey, sorry, wrong brackets. Don't use [ and ] but { and }


Matth33wMatth33w

Rated 5 / 5 stars

Good Tutorial =3



PeterMXPeterMX

Rated 4 / 5 stars

In chapter 3 I keep getting this:
col: 2 Error: The private attribute may be used only on class property definitions.
its referring to this:
private var map:FlxTilemap;
and here are the sources:
[Embed(source = 'org/flixel/data/private/graphics/map.png')] public static var ImgMap:Class;
[Embed(source = 'org/flixel/data/private/texts/map.txt', mimeType = "application/octet-stream")] public static var TxtMap:Class;
CAN SOMEONE TELL ME WHATS WRONG?



RyzzaxRyzzax

Rated 5 / 5 stars

"A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package.
Build halted with errors (fcsh)."

When I try tom compile after the part of the backgrounds in chapter II, I always get that message and I don't know how to resolve it (Yes, I'm a beginner, first time I'm trying to make a game). Everything before worked, and this tutorial seems pretty great and helpful by the way it is presented. I really love the way you are making this tutorial, pretty cool ^^! Definitely deserve 5 starts!

Please someone help me :(