For this guide, I will presume that all Haxe related files will be installed in the
c:\HaxeToolkit\ directory. Make sure to update the paths if you install your files somewhere else!
Haxe is a cool programming language that can compile to multiple platforms. It’s free and open-source.
Install it (including Neko) to a folder like:
Important: for the next sections of this tutorial, I’ll assume Haxe is installed in this
After the setup, you should have the compiler and all the standard libraries in:
Does it work?
- Open a command line,
haxe, you should see something like that:
If you get a “file not found” error:
- check again,
- if it still doesn’t work, re-install.
Hashlink (HL) is Haxe virtual machine. We use it to build cross-platform titles.
Install it to the Haxe toolkit folder:
Important: you must add all the Hashlink (hl.exe) folder to your PATH environment variable (how?).
Does it work?
From a command line, type
If it doesn’t work:
- check again,
- if you get an error, type
- if you get an unknown command error, check your PATH environment variable.
HeapsIO is a free open-source 2D/3D engine used in large game projects, like Dead Cells, Northgard or Evoland 2.
The engine is actually a library of Haxe (ie. an Haxelib) which can be installed easily using the bundled
From a command line, run the following command:
haxelib git heaps https://github.com/deepnight/heaps.git
- we won’t use the default
haxelib install heapscommand here, because the GIT version is much more up-to-date than the haxelib repo (don’t ask me why)
- we also don’t use the official Heaps latest GIT because it’s often unstable. My version is the same as the official, but a few commits late, where it should be stable.
Installing other important Haxe libs
From a command line, for DirectX support in HashLink:
haxelib install hldx
For OpenGL/SDL support in HashLink:
haxelib install hlsdl
You can check the installed libs by typing:
Working with VSCode (recommended)
VScode is a nice IDE that features full Haxe integration if you install the dedicated extension. Out of the box, you’ll get code completion, easier project setup, debugging & much more.
Please note that you can do that from the extension panel. See below:
Making a game
Now everything is ready, we can take care of the most interesting part: making an actual game using my GameBase.
Thank you for this, I've tried several other sites/articles to get haxe set up. Being new to development on Windows (mostly use Linux/Mac these days) your detailed guide was super helpful!
God frigging damn it, I'll go bang my head on the wall… Solved! Thank you Sébastien! My firstborn will be named after you!
Okay, but I've checked several sites and none say the variable name.
I've added HLPATH to C:\HaxeToolkit\hashlink which is where my hl.exe is, rebooted several times but does not recognize… is HLPATH the name?
Hi! You should simply add your "C:\HaxeToolkit\hashlink" path to the PATH environment variable (not HLPATH).
Thanks for this tutorial, would love to see more stuff on heaps from you in the future :)
This is awesome, Thanks.