For those of you who came from massively popular HaxeFlixel, I'm sure you would notice the similarity. HaxeFlixel arguably has one of the most effective template I've seen to date, allowing dev to jump right into working from a pre-made structure that can easily be turned into a full game.
luxe.States is highly optional, and many games have been created without it. Luxe is apparently not heavily built around the state-based structure the way HaxeFlixel/Flixel is. While I personally do find many benefits working this way, not everyone has to. This is not meant to be the default that would come pre-packaged with Luxe one day (though I'd be highly flattered if it is somehow). I also hope that I managed to explain the way Luxe does a couple of things differently to new folks.
The current template is now rather minimal, but does a number of things that I want:
- Allowing easy customization of game size in
Main.hxvia variable declaration.
- Setting the initial state in the same place, like HaxeFlixel does (though a bit unintuitive).
- Creating the state machine
luxe.Statesand add the two existing
luxe.States.Stateto it (do remember to add yours if you need additional states).
- A handful of comments in
Project.flowthat will hopefully make your first setup easier.
Things I don't like at the moment:
App.configis incomplete, mainly due to my unfamiliarity with the engine.
- The way all states has to be declared first hand in
- The way I have to use
State.nameto switch state via state machine, which is a bit unintuitive and confusing sometimes IMO.
But all in all, this is a work in progress, and I look forward to your feedback. At the moment, this is mainly for me and I hope that you also find it useful somehow.
If you are using this template, do let me know what I can do to improve it.