00:00
00:00

Flixel-Tutorial #1

Share Collapse

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


Very good and complex tutorial, deserves watching!


People find this review helpful!

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



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 }


Good Tutorial =3



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?


Click on an icon to vote on this!

Credits & Info

Views
63,720
Faves:
630
Votes
1,925
Score
4.16 / 5.00

Uploaded
Jun 9, 2013
4:34 PM EDT
Genre
Tutorial
Tags