Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

12. June 2018

Haxe 4.0 got one step closer with today’s release of Haxe 4.0.0 preview 4.  The release focuses heavily on improved compiler display services that will enable better editor support in IDEs such as Visual Studio Code.  Change will support auto imports, override completions, structure field name completion and more.  The Visual Studio code extension has already been updated to support the new Haxe 4.0.0 functionality.

Details of the release:

Improved compiler display services

Our focus for this release has been compiler display services. We implemented a new, JSON-RPC-based protocol which is utilized by the vshaxe Visual Studio Code Extension to provide a variety of new features:

  • Support for auto-import
  • Completion on override |
  • Completion for structure field names
  • Support for auto-generating structure declarations, functions, switches and more
  • Context-aware, sorted toplevel completion
  • Reference finding which explores modules that are not necessarily part of the compilation

Improved enum abstracts

Enum abstracts now get the treatment they deserve with a proper enum abstract syntax. Furthermore, values can now be omitted if the enum abstract is defined over Int or String:

enum abstract MyEnum(String) {
    var MyValue; // implicit = "MyValue"

enum abstract MyOtherEnum(Int) {
    var MyValue0; // implicit = 0
    var MyValue1; // implicit = 1
    var MyValue5 = 5;
    var MyValue6; // implicit = 6

Various syntactic improvements

  • extern is now recognized as a field-level modifier and can be used instead of @:extern
  • Metadata names can now use dots, e.g. @:haxe.json becomes a metadata entry named "haxe.json"
  • Structure fields now consistently allow var ?x and final ?x, meaning the same as @:optional var x
  • Type1 & Type2 is now a recognized syntax for intersection types. For the time being, it is only supported to merge structures (replacing the { >Type1, >Type2, } syntax) and for type parameter constraints (replacing T:(Type1, Type2) which has been removed from the language).

Be sure to check the change log for a complete list of changes and bug fixes in the release.  You can download Haxe 4.0.0 p4 right here.  If you are interested in developing games using the Haxe programming language be sure to check out our new Armory tutorial series or our HaxeFlixel tutorial series available here.

GameDev News

6. June 2018

I have been talking a fair bit lately about the Armory3D engine, a newly free open source Blender hosted cross platform engine.  You can target several different platforms using Armory and the technology that makes this possible is Kha.  Today we are looking at Kha.  Kha is an open source cross platform Haxe powered low level framework providing functionality like 2D and 3D graphics, input handling, audio and more.  It does it in an extremely cross platform manner able to support a huge number of platforms.  Essentially it provides the low level functionality required to make a game, much like SDL or SFML.  It is also an important technology to learn if you intend to use the Armory game engine.

Today I take a closer look at this behind the scenes technology in this video.  We cover the features of Kha then go through the process of installing Kha and getting up and running.

Kha has a couple prequisites that you need to install before getting started.  You need to install the following two technologies before installing Kha:

Once installed, you have two easy options for getting started with Kha.  You can either use Kode Studio, a customized version of Visual Studio Code, or you can install the Kha Extension Pack to your existing Visual Studio Code install.  Now that you’re up and going with Kha you probably want some code to work with, which is available in this repository.  Finally once you start learning Kha, you will probably want to check the Kha documentation or the reference materials.

Programming ,

31. May 2018

Now that Armory3D is fully funded an installable version will be available for download any day now.  Armory is a game engine built using the Haxe programming language over the Kha framework that runs inside the open source graphics application Blender.  The timing of this release is ideal, as it was recently announced the Blender Game Engine is being removed from Blender.

Armory is a game engine I’ve been excited for for some time now.  You can learn more about Armory here, access the complete documentation here and download the source code here.  Additionally there are a series of examples available here with more complicated/complete templates available here.  Hopefully the full version will be available for download in the next few days.

I fully intend to do a tutorial series covering using the Armory game engine, which hopefully I will be launching soon.  However in the meantime I created this introduction to Armory which should illustrate to you why this engine has me as excited as it does.  Of course being built on top of Blender, you are also going to have a solid understanding of Blender to make used of Armory3D.  Thankfully, I’ve got you covered there with both a text based and video based Blender tutorial series to get you started.

Video Link

GameDev News, Programming , ,

16. May 2018

OpenFL, the cross platform low level media framework library for the Haxe programming language, just released version 8.1.  The biggest feature by far in this release is beta support for the ActionScript 3.0 language.  This is a strangely karmic release as the FL in OpenFL stands for Flash and ActionScript is the ECMAScript derived scripting language used to program in Flash.  OpenFL is the underlying technology used to create a number of games including the popular indie hit Papers Please.

Details of the release from the OpenFL forum:

OpenFL 8.1 is here, and introduces beta support for ActionScript 3.0 as a source language!

We’d love additional feedback on how we can improve the workflow in our samples.

To get started, enter any of the samples, run npm install then npm start.

We expect to continue to work with Apache Royale until we can bring the workflow up to par with our other supported source languages on NPM (Haxe, TypeScript, ES5 JavaScript, ES6 JavaScript).

Thanks for your support, feedback and help!

OpenFL 8.1 is available on both NPM and Haxelib. Though this is primarily an NPM feature-based release, there are some minor fixes for the Haxelib release as well

You can learn more about OpenFL at the OpenFL homepage.

GameDev News

12. February 2018

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);


These abstract inputs can also be used as Signals:

class MyScene extends Scene
    public function new()


    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

Month List

Popular Comments