Let’s try HaxeFlixel !

Posted by
August 14th, 2014 1:29 pm

I have used libgdx (Java) for LD29 but I find it quite restrictive and I am not very happy with it. That’s why I’ll try using Haxe this time, and use the warmup to try and make a first game.

It does not seems quite complicated and similar to libGdx so I hope this will go fine.

Although, I do like MVC architecture, and while I have no problem using it with libGdx, It doesn’t seem that HaxFlixel is particularly made for this type of thing…

Would you guys have some tips and advice regarding MVC and Haxe ?


4 Responses to “Let’s try HaxeFlixel !”

  1. cacciatc says:

    My advice is make sure you’ve got your tool-chain setup prior and be prepared to re-install. At least with windows, Haxe is the type of tool where if you install something else or even sneeze in the general direction of your computer, then you start getting weird errors and things stopping working. Other than my experience with the finicky environment, I enjoyed working with Haxe a few LD’s ago.

  2. MiniBobbo says:

    My personal advice for using MVC with HaxeFlixel? Don’t.

    Ok, maybe a more helpful answer…

    I also came over from LibGDX recently and settled into HaxeFlixel. I also programmed all my code in a rough MVC architecture. I also wanted to continue the process in HaxeFlixel.

    The problem is that one of the basic building blocks of HaxeFlixel is a FlxSprite. You use them frequently and for everything. Even things like buttons and text are extensions of the FlxSprite class. This class is inherently a combination of the model and the view. You could try to separate the two of them but then you would be either ignoring FlxSprites and all the power and ease they bring development, or 2 duplicating all the dividing the sprite’s code in half and trying to keep everything all straight.

    Hence my personal recommendation of just ignoring MVC and just embracing the “code the model, view, and controller into my game object” mentality that HaxeFlixel seems to embrace.

  3. Belvar says:

    Cheers, guys! Your comments are helpful!

    I’ve started to develop a simple game (a flappy bird clone, I’m a bit ashamed…). It is really powerful and I was impressed by the time it took me to make it.
    I’m sure I’ll eventually find a way to organize my classes in a good way without using MVC. I’ll look at more code made by other people. The demos on the official website aren’t really helpful on this side, since it is small games with all the code in the PlayState class…

    • MiniBobbo says:

      The most useful demo I found by far is Mode. Give that one a shot. I have it open whenever I’m developing because it has all the basics in it and organized in a manner that makes sense.

      Good luck!

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]