@TerryCavanagh TerryCavanagh released this Feb 28, 2018 · 83 commits to master since this release

Assets 3

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 blankproject.zip 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 Music.play() and Sound.play() 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 http://www.haxegon.com/plugins/ 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 blankproject.zip file has been updated again, hopefully for the last time! Updating blankproject.zip to the latest version is required to support plugins.

  • Haxegon is now an organisation on github! See http://github.com/haxegon/ 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 Sound.play().

  • 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: https://github.com/haxegon/plugin_filters

  • 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 Scene.name. (same reason)