HaxePunk 4.0 Released

HaxePunk 4.0 has just been released and is available here.  HaxePunk is a popular 2D framework, starting life as a port of the popular FlashPunk library.  It is capable of makingimage games for several platforms including Windows, Linux, Mac, iOS, Android and HTML.  HaxePunk 4.0 has been in development for over a year and includes several new features including custom shader support, signal binding for events, an improved input system and more.

Details of the release from the HaxePunk blog:


HaxePunk’s Flash target and software rendering support have been removed, simplifying the code and allowing us to focus on hardware rendering features, such as custom shader support. Custom shaders can be applied to any individual graphic as well as entire Scenes.

In addition, the renderer is more robust and has been heavily optimized.

(Read more)


As an alternative to extending and overriding behavior, many parts of HaxePunk now support Signals, which let you bind one or more functions to be called whenever an event occurs. For example, Scenes have signals that fire before/after update, before/after rendering, on input, when the screen is resized, etc.


Improved Input system

The Input system has been unified, making it easier to mix multiple input devices:

Input.define("start", [Key.ENTER]);  Mouse.define("start", MouseButton.LEFT);    trace(Input.check("start"));  

These abstract inputs can also be used as Signals:

class MyScene extends Scene  {      public function new()      {          super();            onInputPressed.start.bind(onStart);      }        function onStart()      {          trace("You either pressed enter or clicked the mouse!");      }  }  

(Read more)

Better BitmapText

BitmapText now supports rich text via XML markup:

BitmapText.defineFormatTag("red", {color: 0xff0000});    var txt = new BitmapText("Here's some <red>colored</red> text!", {      font: "fonts/azmoonfleet.64.fnt",      size: 14,  });  

With these tags you can animate characters, render inline images, change fonts, and more.

Backend abstraction

HaxePunk now officially supports recent versions of both OpenFL and NME. Support for additional backends such as Kha is on the roadmap!

GameDev News

Scroll to Top