
Update: I found that StAidan ported Mode and posted the code here: https://github.com/StAidan/Mode . Look at that code and you'll see that some of my suggestions below are a bit different, with no changes in the original code.
I love Flixel. It's a framework for games written in Flash but I almost hesitate to call it a framework. When I talk about frameworks with friends, they generally have a negative connotation for many reasons but that's another topic. Flixel is one of the few very light weight frameworks that helps developers get stuff done without all the fuss.
If all goes well and we act like Professionals, the next Fellowship project will be based on XNA. I checked around and Flixel had indeed been ported to XNA and is available over at GitHub and is called x-flixel.
A couple of reasons I would like to convince NeilO to use Flixel are not just cause the library is cool and complete but it offers a bit more portability. Flixel will let us make a Flash version pretty easily but Flixel has also been ported to iOS so putting it on iPhone is also a possibility. Flixel is also great for tile based pixel art games.
I needed to get XNA going on my laptop anyway so I thought to test out the Flixel port, I wrote the standard HelloWorld sample. Links to the source and binaries are at the top of this post. At the end of this post I pasted my notes getting the project set up. There were some very minor tweaks I had to make. I'm not sure if its for XNA 4.0 compatibility or what. These are for my own reference but hopefully you will also get some use out of them.
This project isn't much to look at so I don't think it warrants the traditional video but here is a video of the Flixel standard sample game, Mode ported to XNA:
http://www.youtube.com/watch?v=jY4T0iagriY
Rough notes for getting X-Flixel up and running:
- Install XNA Game Studio and download x-flixel
- Create new XNA Windows game
- In the main project, add new folder called 'flixel'. Create a subfolder called 'data'.
- Copy all the x-flixel code to those folders. In Visual Studio right click each and select Add -> Existing Item... and add all the code for each folder.
- In Visual Studio, create a folder in the Content project called 'flixel'
- Copy all the content from the x-flixel\Content\flixel folder to the new flixel folder.
- Edit FlxGame.cs. Add a constructor that takes and passes a Game instance to the base class DrawableGameComponent:
public FlxGame(Game game) : base(game) { } - Edit FlxFactory.cs. In the protected Initialize method, comment out where FlxGame is instantiated and instantiate your own game class that inherits from FlxGame. In my case, HelloWorld() in HelloWorld.cs.
- xflixel doesn't come with the default font 'nokiafc22.ttf'. Download the actual Flixel source code from flixel.org and install the font located in the data directory. You may need to restart Visual Studio to pick up the newly installed font.
- In the Content project, change the Content Processor from Song to Sound Effect for "beep.mp3" and "flixel.mp3"
