What Programming Language Does OpenFL Use?

Updated

OpenFL is written in and used through Haxe, a single language that compiles to native C++ for desktop and mobile targets and to JavaScript/WebGL for the web. You write your application once in Haxe, then publish it to Windows, macOS, Linux, iOS, Android, or a browser without rewriting the codebase.

How Haxe Fits Into OpenFL

OpenFL is a library and toolset built on top of Haxe. That means:

  • Your source code is Haxe. You use Haxe syntax, classes, and the standard library.
  • OpenFL supplies the APIs. The project implements 2D and 3D graphics, audio playback, rich text formatting, user input (mouse, touch, keyboard, gamepads), asset management, networking, file system access, and clipboard read/write.
  • The Haxe compiler handles the output. For desktops, phones, and tablets it targets native C++; for browsers it targets JavaScript and WebGL.

This is why the site describes "one seamless toolset" — the language and toolchain stay the same while the output target changes.

A concrete example

If you build a 2D game in Haxe with OpenFL, the same project can be compiled to a native C++ binary for Windows and to a JavaScript/WebGL bundle for a browser. The rendering and input calls you wrote against OpenFL's APIs are what make that portability possible; you are not maintaining two separate codebases.

What You Can Build

OpenFL positions itself for both enterprise applications and best-selling games. The API surface supports graphics, audio, text, input, assets, networking, and file access, so the same language covers utility apps and interactive games alike.

Related Libraries and Tools

OpenFL's ecosystem includes libraries that extend what you can do in Haxe:

Library What it adds Notes from the project
HaxeFlixel Cross-platform game engine for OpenFL with collisions, particles, and tilemaps Powers titles such as Canabalt, Kid Bubblegum, and Friday Night Funkin'
Starling Framework GPU enhancements: improved batch rendering, texture atlases, bitmap fonts, 3D effects Used in games such as Angry Birds, NCIS: Hidden Crimes, and CSI: Miami Heat

Both are optional — they sit on top of OpenFL rather than replacing Haxe as the language.

Licensing and Cost

OpenFL describes itself as 100% free and open source, with the code available on GitHub and a stated goal of avoiding licensing fees. The site does not publish a price list or payment details; the licensing claim is the project's own description of its open-source status.

Where to Start

  • Developer's Guide — the reference for the APIs and how to use them.
  • Get Started / Download — the entry point for installing the toolchain and beginning a project.
  • Showcase — examples of games, apps, and creative experiences built with OpenFL, useful for judging whether the stack fits your project.

If your goal is a single Haxe codebase that ships to desktop, mobile, and web, OpenFL is designed for exactly that. If you need a specific console target, note that the site lists consoles only tentatively ("and maybe even game consoles"), so verify support before committing.