Primary tabs

Comments by User

Friday, February 21, 2014 - 23:05

To go with mdwh's post, here's a relevant page on HaxeFlixel mobile targets:

http://haxeflixel.com/documentation/mobile-targets/

 

I haven't messed around with mobile targets personally, but I do know that HaxeFlixel was tailored to run on mobile devices - something Flixel has trouble with.

Friday, February 21, 2014 - 15:38

@William

No problemo! Happy to help.

Sure, I'll take a look at your blog. I've got one too that I use to post updates on my game development, and tutorials and whatnot (link: http://www.laughingleader.com/).

 

If you need more information on compilation tags, I'd check out this page on the project file format:

http://www.openfl.org/developer/documentation/project-file-format/

 

I use a few custom tags for my games, like so:

<haxedef name="debug" unless="desktop" />

<haxedef name="TRACE_SOUNDS" if="debug" />

These go in the ProjectName xml file.

 

In my actual code I can then do stuff like this:

#if debug

       loadDebugStuff();

       isDebugMode = true;

#end

 

if (isDebugMode)

{

      debugCommands.update();

}

 

#if TRACE_SOUNDS

        trace("Relevant sound information!");

#end

 

Pretty handy for compiling release builds if you have all your debug stuff managed by a haxedef tag.

 

I also recommend looking at some of the HaxeFlixel addons. There's some good stuff in there.

Flixel-ui is also handy (link: https://github.com/HaxeFlixel/flixel-ui) as well as Firetongue for doing some cool localization stuff: https://github.com/larsiusprime/firetongue

Friday, February 21, 2014 - 14:11

As someone who used to use AS3 and Flixel exclusively, I can tell you that using Haxe/OpenFL and HaxeFlixel is definitely a step up. Haxe feels like an "Actionscript 4", and HaxeFlixel is more actively maintained than Flixel.

 

I would suggest reading up on the AS3 developer's guide, as it'll show you the syntax differences between the two languages (though you may already be well along, as the last post in here was a while ago): 

http://www.openfl.org/developer/documentation/actionscript-developers/ 

 

The ability to use your same code for different platforms is really awesome. I used to have separate web/desktop projects for my AS3 games. In Haxe you can have the one project, and distinguish the code differences with conditional compilation tags, such as

#if desktop

import flixel.input.gamepad.FlxGamepadManager;

import flixel.input.gamepad.FlxGamepad;

import flixel.input.gamepad.FlxGamepadButton;

#end

Normally importing these in the web version would fail when building, as they can't be used for the web. With the conditional tags, it'll skip this part of the code unless it's the target platform. You can create custom tags as well.

Further reading: 

http://www.openfl.org/archive/developer/documentation/conditional-compilation/