Did you ever try to create a game? If so you know the frustrations that comes with it.
This was about to change (slightly) when i got introduced to Haxe, but first lets see what i wanted and why everything else sucked (for me)
My Wishes:
- (Complete) Framework but no IDE.
I dont like Game IDEs. IMO they all are horribly to use and try to abstract logic to something that does not even reassemble any logic anymore. - Somewhat Platform independend.
Ever wrote something awesome on your linux machine just to notice it doesnt work anywhere else? Yeah, i dont like that. Also this rarely works out well with games. - Community & Support.
The best framework or language is nothing without a helpful community, resources & tutorials. There are many great homebrown game frameworks out there, but dont dare to run into issues!
Why everything but Haxe sucked:
- Unity, Defold & Co.
Not only does their IDE kill it for me, but the weird licensing, horrible pricing, and many more issues If it just were Unity i would never finish a game. - JavaScript.
When they hear platform independend they think Javascript. I dont. When i think Javascript i think Spaghetti code (well i know thats just me...) - Flash (and Adobe Air for that matter).
When you faced everything else out this is essentially what is left. Did you ever code in a dead language? Not fun. And dont get me started how i never want to depend on anything Adobe. - Ruby.
I love that language, but except you count Ruby Motion there is no way to write a platform independend, even slightly performant game in Ruby. - Löve2D. Last but definitly not least is Löve. Löve is super fun, i would do everything with Löve if i could because i love Lua and Löve really has a cute API. However when it comes to third party extensions the build process starts to get weird and complicated. It doesnt feel very platform independend anymore at that point.
Came to make the world a better place: Haxe
Honestly, Haxe is weird. Have you ever heard of a language that compiles in different languages and does this well? Me neither. However it is there, and to my surprise it really does a good job. Instead of a IDE they extend popular Editors like Sublime Text or VSCode (eww) The language and APIs are logically designed. The language kinda easy to pickup (Its designed after AS3, but i never done flash before so i dont really know)
I dont want to say its easy to get started. Hence its not even easy to figure out what there is and why you'd use what. After some digging i settled on OpenFL and Flixel but all the other options looked interesting as well. However i decided that the Game API Flixel provides mostly looked like something i could work with.
Building the Game
As said i would not call it easy. However it's not hard either. After working through some deprecated tutorials i just settled for a new project and started to copy paste tutorial code snippets until i figured out how everything works. The Flixel Docs definitly were helpful as well.
As you'd expect the game actually works on pretty much any building target Haxe provides. This doesnt stop with Android and iOS but also includes Playstation if you want. Next to having dedicated targets for Mac, Linux and Windows plus something that compiles super fast and is called "Neko"
Only when we included Third party things (Like ads, crash reports) the app got slightly more platform specific. Third party SDKs are usually build in the targets language
so they are not available on Targets they werent coded for. However its super easy to do things like #if android
.
It took me about 4 weeks from start to finish, honestly thats not bad at all for a full game in a new language.
Conclusion
Give Haxe a try. Really do. Even if you dont want to create games it is a fun environment to work in and a good thing to know about.
Maybe i'll add some (not outdated [for now]) Tutorials about the process later!
For now check out: Pixel Blackjack to see the result!