Note: The recommended way to use Haxegon is to install it via haxelib:

haxelib install haxegon

0.12.0 (2018-02-28)

Migrating to 0.12.0 from older versions of Haxegon

This update was focused on making some final calls about the structure of the library. From here on out, you can expect Haxegon’s API to stay pretty stable!

Here are the main things you’ll need to change to migrate to 0.12.0:

  • Download the new file, and copy your project source and data files into the new folder. This should hopefully be the last time the project file changes. Make sure you have a plugin/ folder after you do this!
  • Text.align is now a variable instead of a function, so change Text.align(Text.CENTER) to Text.align = Text.CENTER.
  • The offset parameter of and has been moved, so you should check that you have the parameters in the right order.

New features

  • Haxegon now supports a plugin system, inspired by OpenFrameworks! Plugins allow you to expand the funtionality of Haxegon. There are three available right now (keep an eye on for an up to date list.) The three initial plugins:
    • Layers: A simplified display list.
    • Filters: A fullscreen post-processing shader plugin.
    • imGui: A simple imgui library.
  • The file has been updated again, hopefully for the last time! Updating to the latest version is required to support plugins.
  • Haxegon is now an organisation on github! See for all related Haxegon plugins and projects.
  • Haxegon is now licenced under the MIT licence.
  • Haxegon now uses .mp3 files for all browsers in HTML5. .ogg files are no longer required for HTML builds (though they’re still required for Native builds for the time being). Alternatively, .wav files work on all platforms.
  • Haxegon can now read JSON and XML files! They’re loaded from the data/text/ directory, same as TXT and CSV files. Check out the new JSON and XML parsing to see how to parse them.
  • Text.align is now a variable instead of a function. Instead of Text.align(Text.CENTER), you type Text.align = Text.CENTER. (This means it’s now possible to check the current Text alignment.)
  • You can read all inputted keys from the new Text.inputbuffer String. This is basically a low level version of the Text.input() system for if you want to do something fancy.
  • Removed Gfx.keeppixelratio. As a replacement, Gfx.resizescreen(w, h) has been changed to Gfx.resizescreen(w, h[, keeppixelratio]).
  • Added Gfx.onwindowresized(), which is true when the window has been resized this frame.
  • Haxegon’s random number generator has been replaced with an implementation of Xorshift, which should mean that it gives better results than the old system, and gives predictible results for any given seed on every target platform.
  • You can now use string based seeds for Random.seed, in addition to numbers. e.g. Random.seed = "winter", Random.seed = 1234; both work.
  • Added a new function, Random.weighted([options], [odds]) - inspired by chance.js.
  • Removed offsettime as a variable from Sound and Music functions.
  • Added volume as a parameter to
  • Added all previous haxe Math function to Geom. They’re exactly the same, except they use degrees instead of radians. Haxegon now uses degrees everywhere. (e.g. You can call Geom.sin() instead of Math.sin())
  • The Filters class has been removed. Filters is now a plugin, and has several new settings:
  • Added Core.version.

Bug fixes/Tweaks

  • Fixed a bug where Convert.toint() could give an incorrect value for large negative numbers.
  • Fixed a situational crash bug with changing Gfx.drawto() targets in update() functions.
  • Fixed a crash bug where Haxegon would crash on some platforms if Gfx.drawimage() or Gfx.drawtile() draw an image or tile that doesn’t exist.
  • Fixed a bug with Gfx.linethickness.
  • Fixed a crash bug on HTML5 when trying to display arrays with Text.display().
  • Haxegon now releases all keypresses when it loses focus (thanks @randomnine)
  • Removed the old Ctrl + Click behavior for Flash to simulate a right click.
  • Haxegon uses “top left” as the default pivot point for all scales and rotations now.
  • Removed Scene.get(). It encouraged bad behaviour that probably doesn’t reliably work anyway (i.e. non static scene classes).
  • Removed (same reason)