Flixel is a free and open source 2D game development framework written by Adam "Atomic" Saltsman (Canabalt, Hundreds) in AS3 for making Flash games. It is a very mature, flexible and robust library. In this article, we'll introduce you to the platform and its capabilities, and share tutorials, plugins, and suggestions to get you started developing games with it.
What Makes Flixel So Awesome?
Flixel is written in a way that you get started with your game from the get go. This small library packs an essential array of tools that lets you build 2D platformers, RPGs, Physics puzzles and a lot more.
It comes with a class-based scene management system, and gives you a simple sprite class that also has some physics properties like velocity, acceleration and angular acceleration. It has its own tilemap parser and loader, and a utility class that helps you do collision detection and resolution between sprites, tilemaps or groups as you see fit. It also has simple button and text classes for UI, particle systems, virtual camera classes, and support for pathfinding, replays, game saves, sound and input. Furthermore, you can extend it by writing plugins.
As a programmer, Flixel is by far one of the fastest ways I've found to prototype my game ideas.
Notable Games Made With Flixel
(Made with the Flixel template/libraries for iOS - see the Ports section below.)
Getting Started With Flixel
Flixel homepage: http://flixel.org
Even if you take my word for it, It would be good for you to see all these awesome features in action! So, the first place to start your Flixel quest would be the official website.
Flixel features: http://flixel.org/features.html
The Features page hosts a number of live examples for all the latest features in Flixel.
Flixel forums: http://forums.flixel.org/index.php
One of the of the best places to get quick and effective help with Flixel is the forums.
Flixel IRC: #flixel on freenode.net - irc://irc.freenode.net:6667/flixel
The other place you could find people using Flixel who could help you out would be the IRC channel on freenode. Remember, ping with data!
The documentation: http://flixel.org/docs/
Flixel is very well documented and the flashdoc generated documentation is something that you will use all the time.
The source: http://flixel.org/download.html
The flixel source code is structured and organised enough for you to read through when the time comes, and it is afterall, the source of the documentation itself.
In case you are new to Flash, a guide to FlashDevelop will definitely help you get a head start.
How to Learn Flash and AS3: http://gamedev.tutsplus.com/articles/how-to-learn/how-to-learn-flash-and-as3-for-game-development/
And if you are very new to Flash, this guide will get you up to speed!
Keeping Things Alive
The last stable release of Flixel was almost two years ago, but that does not mean that it is dead. Flixel has a vibrant and active community of users that keep the fire burning.
The Flixel Community: http://flixelcommunity.github.com/
Flixel Community Releases: https://github.com/FlixelCommunity/flixel-release
Guides to Help You Find the Way
This is possibly the longest and the most detailed of tutorials out there that you can find on how to make a platformer with Flixel. It takes you through the whole process of making a game step by step.
- Project Jumper Part 1: Let's get organized
- Project Jumper Part 2: The bare minimum
- Project Jumper: Interstice
- Project Jumper Part 3: I love what you've done with the place
- Project Jumper Part 4: Introducing the opposition
- Project Jumper Part 5: Killing the player, aka Failure Is Always an Option
- Project Jumper Part 6: Sound; Bleeps Bloops and Frustrated Screams
- Project Jumper: Interstice II
- Project Jumper Part 7: Lock and Load
- Project Jumper Part 8: This isn't stomp at all! Fixing the delay in embedded sounds
- Project Jumper Part 9: Agility Training
- Project Jumper: Interstice III
- Project Jumper Part 10:The Beginning and the (Bad) End
- Project Jumper Part 11: They're Everywhere!
- Project Jumper Part 12: Odds and Ends
- Project Jumper Part 13: Push and Shove
PhotonStorm is one of the major figures in the Flixel community. Aside from his contributions on the forums, PhotonStorm has a huge collection of Flixel and Flash related tutorials to his name.
I had written a simple platformer example aimed to help students in my local IGDA community kick start making games with Flixel. It is a simple game with a start, a finish and lots of comments to help you along the way.
- GitHub: https://github.com/yadurajiv/revenge
- Play: https://dl.dropbox.com/u/1526334/revenge/index.html
- Slideshow: http://www.slideshare.net/yadurajiv/making-games-with-flixel
Goto and Learn's Video Tutorials (Flixel v2.35)
Goto and Learn has a couple of video tutorials to help you get started as well:
- Building Games with Flixel - Part 1: http://gotoandlearn.com/play.php?id=138
- Building Games with Flixel - Part 2: http://gotoandlearn.com/play.php?id=139
Ready for More?
Once you get the hang of it, here are some of the more advanced topics that you can look into.
PhotonStorm's Flixel Power Tools: http://www.photonstorm.com/flixel-power-tools
One of the most ridiculously awesome contributions by PhotonStorm is a set of plugins called the Flixel Power Tools. From user interface elements to helper math classes to special effects, it has them all! They are also available on GitHub.
Funstorm Games: http://www.funstormgames.com/blog/2012/01/8-flixel-tutorials/
A collection of eight tutorials dealing with different aspects of the engine
Advanced Object Recycling: http://ditdahgames.com/2011/12/advanced-flixel-topics-aggressive-object-recycling/
A look at optimizing and recycling objects in your game
Other Noteworthy Links
The Flixel Help page: http://flixel.org/help.html
The help page has a listing of open source projects that uses Flixel that you can download and read through.
Flixel on Twitter: https://twitter.com/flixation
The official Twitter account is quiet for now, but you never know what will happen...
The Flash Game Dojo: http://flashgamedojo.com/
The Flash Game Dojo is a community-powered knowledge base for things Flash, including Flixel.
An old overview of Flixel from the Flash Game Dojo: http://flashgamedojo.com/wiki/index.php?title=Flixel
Listing of all code snippets and explanations related to Flixel from the Flash Game Dojo: http://flashgamedojo.com/wiki/index.php?title=Category:Flixel
All good things in life... get ported? I cannot stress enough on how fast it is to make games in Flixel. Who wouldn't want the same in different platforms and languages?
Android port: http://code.google.com/p/flixel-android/
flixel-android is a port of flixel to Java and Android. It's built on top of the libgdx framework which allows apps to be deployed on both Android devices and desktop machines.
Flixel XNA: https://github.com/StAidan/X-flixel
A C# and XNA source code port of Flixel.
Bluegin is a port of Flixel and Cinder for mobile devices (Android 1.6+) and is written in C++.
Distillate is a cross platform engine based on Flixel written in C++
Although not a port, this is a hardware accelerated 2D engine written in ActionScript, much similar to and inspired by Flixel.
Flixel has made game development one of the most enjoyable and worry-free activities there can ever be. Be it making a game during a jam or cooking up prototypes under short deadlines, Flixel has always come through as a winner.
Whether you are a beginner trying to get into game development or a veteran programmer trying to find a something for quick prototyping, I strongly recommend Flixel. Have fun with it!