Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.56 KB

File metadata and controls

66 lines (43 loc) · 1.56 KB

HashLink

HashLink is a virtual machine for the Haxe programming language. By targeting HashLink you are also able to generate Native C code for your project.

A step by step guide can be found in [[Hello-HashLink]].

HashLink is able to support both SDL and DirectX. At least one and only one is required. OpenAL provides using sound.

For SDL

-lib hlsdl

For DirectX (Windows)

-lib hldx

OpenAL (for sound)

-lib hlopenal

More available libraries can be found here.

Compile for HashLink:

To compile for HashLink use the following example.

# class paths
-cp src

# entry point
-main Main

# libraries
-lib heaps
-lib hlsdl
#-lib hldx

# output
-hl bin/game.hl

Hot Reload

Hot reload allows to program new features into a game while it is running.

Use the following flag to allow that Hot Reload is being used.

-D hot-reload

Now run your HashLink program with hl --hot-reload mygame.hl

Now everytime you re-compile, the running game also gets updated.

Note that this has its limits and this feature is still under development and being tested. Currently no new fields can be implemented. However it works well for modifying the behaviour of an already existing method (class function), for instance the update method and all other functions called inside it.

(See details here: https://github.com/HaxeFoundation/hashlink/wiki/Hot-Reload)