Flixel 2.0 vs Love2d

02 Mar 2011

Choose Flixel over Love2d.

I recently made a post about Pygame vs Love2d. I declared love2d a winner by a whisker (unless the project you are working on is huge). That post didn’t mention details, eg: setup time, language and art resources.


Flash builder environment, it’s based on Eclipse so it’s good.

Why Flixel is awesome:

  • Making a game takes 5 minutes. Really.
  • You can run it on anything (ex iPhones)
  • It looks pro, (choosing pixel art = fast dev and looks cool)
  • ActionScript 3.0 rocks, it’s a better version of Java
  • You spend more time thinking about your game, instead of how it works
  • Graphics things (eg blend modes) to make your game pretty

If you’re participating in a game jam, expect to get 2,000 hits on a flash page instead of 30, people hate downloading .exes. If you want to $ell your game, you can can make an .exe or .app to distribute and no one will know you cheaped out.


Love2d working environment. Scripts and tabbing, yuck!

Why Love2d sucks:

  • Lua is not a game dev language (eg: lacks basic ADTs)
  • Lua’s documentation/API is crap
  • Love2d lacks optimizations, (eg: no sprite group, so bliting 1,000 objects is slow)
  • The Garbage Collector is shit, it will delete at random times causing choppy behavior & crashes
  • Distributing takes ages (expect to waste 1 hr for both mac & PC)
  • No good examples
  • Most IDEs don’t support lua (setting up an environment is nasty)

I admire both their licences: Love2d = zlib, Flixel = “do what ever you want”. Flash is of course proprietary and is needed to run Flixel. So you may have to display a Adobe Flash logo if your game becomes the next Minecraft. These details are pedantic, but something to keep in mind.

So try Flixel 2.0 today. It’s awesome.

Tags: , , , ,

· · · ◊ ◊ ◊ · · ·

Flixel makes it easy to put in a loading frame into your game.

package
{
	import org.flixel.*; //Allows you to refer to flixel objects in your code
	[SWF(width="640", height="480", backgroundColor="#000000")] //Set the size and color of the Flash file
	[Frame(factoryClass="Preloader")]

	public class MyGame extends FlxGame
	{
		public function MyGame()
		{
			super(640/2,480/2,MenuState,2);
		}
	}
}

Change MenuState to your first state. Then create a new ActionScript Class called Preloader.as

package
{
	import org.flixel.FlxPreloader;

	public class Preloader extends FlxPreloader
	{
		public function Preloader()
		{
			className = "MyGame";
			super();
			minDisplayTime = 5;
		}
	}
}

You will only see the loaded if you make a release build. The minDisplayTime makes sure you can see it when loading it locally.

Of course, change all instance of “MyGame” to the class you used for your game.

Tags: , , ,

· · · ◊ ◊ ◊ · · ·