Haxe Toolkit 
A multi-platform development solution 
by Romuald Halasz, 29.08.2014
A little bit about me 
- started work with QuickBasic, BPascal, C++ 
- Visual Studio 2005, OpenGL, DirectX 
- PHP, HTML, CSS, JavaScript 
- Flash, Flex 
- Haxe, NME, OpenFl 
- currently hosting TGD Meetup
Presentation structure 
Introduction to Haxe 
- language features 
Cross-platform aspects 
- specific APIs,target specific platforms 
Games 
- available tools, live demo
Getting acquainted with Haxe 
A bit of history: 
22 October 2005 by French developer Nicolas Cannasse 
Haxe 2.0 was released in July 2008, 
Haxe 3 was released in May 2013 
open source 
Toolkit: 
- language 
- standard library 
- compiler
Language Specifics 
- based on ECMAScript standard, similar to ActionScript 
- strictly typed 
- object oriented 
- conditional compilation (platform specific) 
- inline calls 
- metadata 
- type params, constraints, variance 
- etc. (pattern matching, abstract types, string interpolation …) 
- more info: http://haxe.org/documentation/introduction/language-features.html
What does it look like ? 
class Test { 
static function main():Void { 
var people:Array = [ 
"Elizabeth" => "Programming", 
"Joel" => "Design" 
]; 
for (name in people.keys()) { 
var job = people[name]; 
trace('$name does $job for a living!'); 
} 
} 
}
Language Architecture 
- Haxe API 
- platform-specific APIs 
- libraries 
- frameworks
Haxe Standard Library 
- general classes 
- system (requires platform compilation) 
- target specific APIs 
(cpp, cs, flash, php etc.)
Haxelib 
- library manager 
- CLI tool 
- browse and download libraries: 
http://lib.haxe.org/
Targets and Use Cases 
Name Kind Static typed Sys Use Cases 
Flash byte code Yes No Games, Mobile 
Neko byte code No Yes Web, CLI 
ActionScript 3 source Yes Yes Games, Mobile, API 
JavaScript source No No Web, Desktop, API 
PHP source No Yes Web 
C++ source Yes Yes Games, CLI, Mobile, Desktop 
Java source Yes Yes CLI, Mobile, Desktop 
C# source Yes Yes Mobile, Desktop 
Python source No Yes CLI, Web, Desktop
Focusing on Games 
available tools, the stack, frameworks
Light Media Engine - Lime 
abstraction layer 
one codebase for many cross-platform targets 
available targets: 
Windows, Mac, Linux, iOS, Android, BlackBerry, Tizen, Emscripten, HTML5
Lime - How does it work ? 
Exposes: 
OpenGL, Audio, Input, windowing, native features 
Stack: 
- CLI tools: manage build,package,install,run 
- native layer: rendering,sound,platform core 
(C++, Java and Objective-C) 
- Haxe wrapper - exposes this functionality, abstract differences
OpenFl - Open Flash Library 
Cross-platform Flash API 
Powered by Lime 
Hardware rendering, compiles to native C++ 
Reaches more platforms than Adobe AIR 
Haxe as ActionScript 4 
Platforms: 
Windows,Mac,Linux,iOS,Android,BlackBerry,Tizen,HTML5,Firefox OS,Flash
OpenFl-compatible libraries 
HaxeFlixel - Haxe port of Flixel 
HaxePunk - Haxe port of FlashPunk 
Nape Physics Engine - 2D rigid body physics 
Box2D 
Actuate - tween animation library 
etc.
Available Editors and IDEs 
FlashDevelop 
Sublime Text - plugin available 
IntelliJ IDEA - plugin available
HaxePunk Framework 
OpenFl-based port of FlashPunk 
Designed for games 
Open-source 
Features 
- rendering: Image, SpriteMap, Canvas, Emitter, GraphicList etc. 
- input: Keyboard, Mouse, Joystick, Multi-Touch 
- tweens: Motion, Sound, Misc. (Angle, Color, Num, Var etc.)
Creating a new project 
Creating the config file: XML 
- meta, window (w/h,fps), source(package,libs), assets path 
Scenes 
- entity containers, switch between 
Entities 
- primary actors, handle display, collision etc.
Thank you! 
...now on to the demo!

Haxe Toolkit and Game Development

  • 1.
    Haxe Toolkit Amulti-platform development solution by Romuald Halasz, 29.08.2014
  • 2.
    A little bitabout me - started work with QuickBasic, BPascal, C++ - Visual Studio 2005, OpenGL, DirectX - PHP, HTML, CSS, JavaScript - Flash, Flex - Haxe, NME, OpenFl - currently hosting TGD Meetup
  • 3.
    Presentation structure Introductionto Haxe - language features Cross-platform aspects - specific APIs,target specific platforms Games - available tools, live demo
  • 4.
    Getting acquainted withHaxe A bit of history: 22 October 2005 by French developer Nicolas Cannasse Haxe 2.0 was released in July 2008, Haxe 3 was released in May 2013 open source Toolkit: - language - standard library - compiler
  • 6.
    Language Specifics -based on ECMAScript standard, similar to ActionScript - strictly typed - object oriented - conditional compilation (platform specific) - inline calls - metadata - type params, constraints, variance - etc. (pattern matching, abstract types, string interpolation …) - more info: http://haxe.org/documentation/introduction/language-features.html
  • 7.
    What does itlook like ? class Test { static function main():Void { var people:Array = [ "Elizabeth" => "Programming", "Joel" => "Design" ]; for (name in people.keys()) { var job = people[name]; trace('$name does $job for a living!'); } } }
  • 8.
    Language Architecture -Haxe API - platform-specific APIs - libraries - frameworks
  • 10.
    Haxe Standard Library - general classes - system (requires platform compilation) - target specific APIs (cpp, cs, flash, php etc.)
  • 11.
    Haxelib - librarymanager - CLI tool - browse and download libraries: http://lib.haxe.org/
  • 12.
    Targets and UseCases Name Kind Static typed Sys Use Cases Flash byte code Yes No Games, Mobile Neko byte code No Yes Web, CLI ActionScript 3 source Yes Yes Games, Mobile, API JavaScript source No No Web, Desktop, API PHP source No Yes Web C++ source Yes Yes Games, CLI, Mobile, Desktop Java source Yes Yes CLI, Mobile, Desktop C# source Yes Yes Mobile, Desktop Python source No Yes CLI, Web, Desktop
  • 13.
    Focusing on Games available tools, the stack, frameworks
  • 14.
    Light Media Engine- Lime abstraction layer one codebase for many cross-platform targets available targets: Windows, Mac, Linux, iOS, Android, BlackBerry, Tizen, Emscripten, HTML5
  • 15.
    Lime - Howdoes it work ? Exposes: OpenGL, Audio, Input, windowing, native features Stack: - CLI tools: manage build,package,install,run - native layer: rendering,sound,platform core (C++, Java and Objective-C) - Haxe wrapper - exposes this functionality, abstract differences
  • 16.
    OpenFl - OpenFlash Library Cross-platform Flash API Powered by Lime Hardware rendering, compiles to native C++ Reaches more platforms than Adobe AIR Haxe as ActionScript 4 Platforms: Windows,Mac,Linux,iOS,Android,BlackBerry,Tizen,HTML5,Firefox OS,Flash
  • 17.
    OpenFl-compatible libraries HaxeFlixel- Haxe port of Flixel HaxePunk - Haxe port of FlashPunk Nape Physics Engine - 2D rigid body physics Box2D Actuate - tween animation library etc.
  • 18.
    Available Editors andIDEs FlashDevelop Sublime Text - plugin available IntelliJ IDEA - plugin available
  • 19.
    HaxePunk Framework OpenFl-basedport of FlashPunk Designed for games Open-source Features - rendering: Image, SpriteMap, Canvas, Emitter, GraphicList etc. - input: Keyboard, Mouse, Joystick, Multi-Touch - tweens: Motion, Sound, Misc. (Angle, Color, Num, Var etc.)
  • 20.
    Creating a newproject Creating the config file: XML - meta, window (w/h,fps), source(package,libs), assets path Scenes - entity containers, switch between Entities - primary actors, handle display, collision etc.
  • 21.
    Thank you! ...nowon to the demo!