Introducing OpenFL

I am happy to announce a new platform for building creative content — OpenFL — which is currently available as a release candidate for Windows, Mac and Linux users.

In 1999 the world began to embrace the Flash browser plugin as a way to create and experience interactive content, reaching 92% of internet users. Times have changed, but the need to deliver creative projects has perhaps become even more important than ever.

In the past ten years, we have seen the wireless industry explode and we have seen web browsers develop features that only plugins could deliver before.

OpenFL combines years of work to provide for the industry-standard Flash API without the Flash plugin.

In order to succeed on mobile, it is important to take of advantage of device hardware, and to be as native as possible. That is why OpenFL allows direct access to device features using extensions, why OpenFL makes it possible to target iOS, Android and BlackBerry as fully native applications, and to accelerate the Flash API using OpenGL for a fast, productive development environment.

OpenFL can also target JavaScript directly, thanks to the Haxe Toolkit that powers the platform. Today, users of OpenFL can target HTML5 or the beta support for Emscripten and WebGL, while supporting the Flash Player runtime, for flexibility when providing content for the web.

OpenFL is free, hosted on Github under the permissive MIT open-source license. We invite you to join with us as we build the best 2D development platform for the next 5-10 years.

Though Flash is a popular API, we believe in allowing the community to innovate in new ways to build games and applications. That is why OpenFL seeks to also provide an open platform, including OpenGLView, an accelerated way to build content for Windows, Mac, Linux, iOS, Android, BlackBerry and HTML5 using the WebGL API.

You can Get Started with OpenFL now. More details and a new website will be coming soon.

  • Nice work and all the best. Waiting for the stable build for MAC.
    By the way, whats the most important difference of openFL and NME ?!

  • I’ve been using OpenFL on the Mac successfully, the issue was having 32-bit Neko instead of the new 64-bit Neko that was unexpectedly introduced, then recompile haxelib. You can find updated instructions at the above “Get Started” link 🙂

  • Thanks Josh for the quick reply.
    What is the major difference between NME and OpenFL?

  • Sébastien Bénard

    I’m not sure I understand: isn’t openFL a little redundant to NME? Is it the end of NME development?

  • disqus_uMxVz11VMx

    Good news ! And for 3D application, OpenFL will be good ?

  • NME is going to become a “native media engine” that can enable Haxe frameworks to run on native platforms. It is used as an internal dependency for openfl-native

  • OpenFL is an advancement of everything there is to love about NME, and NME is taking a backseat so it can focus on being a stable, powerful C++ backend for native platform support

  • Though the tooling will focus primarily on 2D development, using OpenGLView you will be able to develop cross-platform 3D features

  • Hyaku

    Hi Joshua! I’m trying to build an example but I can’t. The CMD says:

    Warning: Could not find template file: haxe
    Warning: Could not find template file: flash/hxml
    Warning: Could not find template file: flash/haxe
    Fatal error: exception Failure(“File not found bin/flash/haxe/release.hxml”)

    The same for other targets/examples.

    Any idea? I’m using Windows8.

    Btw, the cross-platform OpenGL binding sounds AWESOME.

  • Can you check and see if “openfl” is being called from the command-line? Unexpected results can happen if you call “nme”. What sample are you trying to build?

  • Hyaku

    Do you mean if i’m typing “nme test flash” instead of “openfl test flash” ?

    I’m not, i have just followed the getting started guide step by step. I don’t even have NME installed right now, i have made a clean Haxe installation for Haxe3 and OpenFL.

    I have tried with several samples and several targets with the same results.

  • Никита Караченцев

    I got error – Mac os 10.8

    $ openfl create DisplayingABitmap
    $ openfl test flash
    Invalid commandline class : Data should be tools.haxelib.Data
    Data.hx:134: characters 4-19 : Invalid package : should be tools.haxelib

  • BlackMael

    I cannot compile the SimpleOpenGLView sample. I get the following error when I try to execute: openfl build flash

    Source/Main.hx:17: characters 9-37 : Class not found : GLProgram

  • Try the sample using another target. OpenGLView is currently supported on Windows, Mac, Linux, iOS, Android, BlackBerry and HTML5, but not Flash right now.

  • I am sorry, the “Get Started” instructions were a little confusing.

    Change into the “DisplayingABitmap” directory before “openfl test flash” or run “openfl test DisplayingABitmap flash” to target that directory

  • Maxime Girard

    I also have a problem with Mac version. After installing Neko-32bits, when I try to install OpenFL with the command :
    $ haxelib install openfl
    I have this message : “No such Project : openfl”

  • Make sure you are using Haxe 3 as well 🙂

  • Espen Breivik

    First of all, I appreciate the hard work and effort that you have put into these projects!

    The announcement of OpenFL was quite confusing for me (and possibly for others?), especially how this relates to NME and if NME is becoming obsoleted. I was also surprised that “Flash” was used as branding name. Although I understand it is modelled after Flash, and that Flash is a popular platform, arrows are pointing away from this as a preferred platform. In that sense, you may be stuck with a name that is loaded with negativity?

    I think the relation to NME and the goals for each platform, maybe through some sort of simple architecture diagram or similar would have been very helpful. From my current understanding, you are focusing on core media capabilities in NME and “moving” more advanced 2D (and 3D) capabilities into OpenFL?

    As for technology goes, it is probably a good mood and all my above comment was mainly for communication. As long as it works, I won’t complain much. 🙂

    On a side nore: Google always think I’m trying to search for OpenGL when I try to find information about it 😉

  • Dennis Adriansyah Ganda

    can I install both openFL and NME in one PC? I want to try but don’t want to leave the old NME either 😐

  • Jacic

    A couple things about OpenFL on Linux currently:

    First, when running “openfl setup linux” it assumed apt-get was available and couldn’t install gcc, etc for me. I already had the needed packages installed, but this should be fixed for those using another package manager.

    Second, when running ‘openfl setup android” I discovered an error related to the debug keystore: it doesn’t exist. Full error:

    cp: cannot stat ‘/usr/lib/haxe/lib/openfl-tools/1,0,0-rc,3//bin/debug.keystore’: No such file or directory
    Called from ? line 1
    Called from CommandLineTools.hx line 1000
    Called from CommandLineTools.hx line 1285
    Called from utils/PlatformSetup.hx line 473
    Called from utils/PlatformSetup.hx line 485
    Called from utils/PlatformSetup.hx line 817
    Called from a C function
    Called from helpers/ProcessHelper.hx line 162
    Called from helpers/ProcessHelper.hx line 217
    Uncaught exception – Error running: cp /usr/lib/haxe/lib/openfl-tools/1,0,0-rc,3//bin/debug.keystore ~/.android/debug.keystore []

    Is there anywhere else I can get this or is this specific keystore important?

  • Thanks!

    I see the problem, and posted a fix to the repository. I will post a new version on haxelib soon

  • You can have both, but NME was released for Haxe 2, while OpenFL only supports Haxe 3. There are ways to run NME on Haxe 3, but if you are upgrading I would recommend trying OpenFL.

  • Jacic

    Another oddity: I can’t seem to get packages to work in my projects, at least in my class files. An empyt package like “package;” compiles fine, but something like “package com.something.else;” doesn’t. In the latter case, OpenFL (I think) gets upset:

    Export/flash/haxe/ApplicationMain.hx:4: characters 7-11 : Invalid package : should be com.jacobwgames

    I’m able to compile by having an empty package, as I said, but is this the right approach? I still have the package set in project.xml.

  • Do your folders match the package name?

    For example, assume your code lives under “Source”, you would want “com.jacobwgames.MyCoolClass” to be located at “Source/com/jacobwgames/MyCoolClass.hx”

    Otherwise if it was under “Source” directly, you’d need the package to be empty, to match the source folder

  • The code package is different in this case than your “meta package” in your project file. That package name is used for app stores, while the class packages you use can be completely different or the same, depending on what organization you like.

  • Jacic

    I got that. I made sure that the folders are named the same, and that the files were found.

  • Rocks Wang

    Hi Joshua, is there a roadmap for OpenFL? I wonder how will GL stuff be supported in flash target? maybe via flash cc? will stage3d api be supported by openfl on all platforms?

  • We haven’t published a roadmap yet, but I’m curious to see if developers are interested in supporting GL on Flash, using something such as an improvement over the “GLS3D” project Adobe started, or a compatibility layer on top of OpenGLView to use a Stage3D API. Currently the officially supported APIs are Stage3D when targeting Flash Player, and OpenGLView when targeting other platforms

  • Akim Gacem

    I successfully installed it on Windows 7 64 bits, the samples project works fine!
    I wonder if any plan to build content for the Playstation Mobile platform in future?
    Wishing to the new OpenFL long life and more success story than NME 🙂

  • Have you seen 🙂

  • Akim Gacem

    cool indie game!
    i guess possible through Haxe -> C# ( ^^

  • That’s what he used

  • Akim Gacem

    I see . Thanks 🙂

  • It isn’t out-of-the-box supported right now, but Martin did it. The upper-level code was NME, compiled using the C# target, then he implemented display objects using the Vita SDK. If we want to, I think we could make something like this official

  • Akim Gacem

    Yes, minor things to adapt for the Vita SDK finally, but i m not against a “openfl test DisplayingABitmap playstation” ;-p

  • Kevin Newman

    Any chance for a set of native API bindings (kind of like what Xamarin does for Mono)?

  • Kevin Newman

    Any chance for Stage3D on other platforms than Flash? There is a Playscript implementation of Stage3D in github – maybe that could be ported to HaXe with relative ease?

  • It is possible to make native extensions in C++, Objective-C or Java (based on the patform), which should provide the ability to access the native platform. Is there some specific binding you were hoping for?

  • You may be interested in this topic:

  • Kevin Newman

    General access to all the APIs really – mostly the GUI toolkit, but also some of the hardware stuff, like AVFoundation on iOS for example.Xamarin apps look and feel exactly like native apps. Something like Rdio has a lot of appeal, and I feel like I could sell that to clients more easily than other crossplatform tools with all their inconsistencies and limitations. It seems native GUI toolkit support is more important on mobile than it ever was in browser or desktop apps (or than games, where that doesn’t matter at all).

    Xamarin exposes native APIs through language specific “bindings” which are wrappers around whatever native API language APIs (in Java, or Obj-C, etc.) to C#. They put these together with some automated tools, and some manual processes. What I’m wondering is if that can be done relatively easily with HaXe/NME/OpenFL.

  • Nikhil Suresh

    WOW, that’s brilliant! That’s pretty much cemented my choice of game frameworks. Amazing work Joshua!

  • Ian Harrigan

    Ive moved over to openfl (from nme) and somethings dont seem to be working (that certainly did work in nme). Firstly when i try and draw a linear gradient, it draws a radial one in cpp/neko (flash is fine) and DropShadowFilter doesnt seem to do anything, again on cpp/neko (flash is also fine). Im wondering (hoping) these are just teething problems? Great work though!

  • Which version are you moving over from?

  • Ian Harrigan

    I was using nme 3.5.5 and haxe2, I moved over to haxe3 and openfl 1.0.0. Using the same basic drawing code for filters and gradients the results on cpp/neko arent the same.

  • Can you send a sample project that illustrates the issue? Thanks, I appreciate it!

  • Ian Harrigan

    Thanks Joshua, i have the test project ready and it shows the problem clearly. Where would you like me to send it?

  • Shin-NiL

    Hello Joshua, how are you?

    I do not know if this is the correct place, but here goes: Is possible to add a new cpp target for openfl? If yes, is there any guide available? I’m working on a portable device which runs a linux distro with SDL but no OpenGL support.

    Thank you.

  • Thaylin Burns

    Is there any way to mix and match certain things from flambe with the openfl framework? Namely, I’d like to be able to use the flump spritesheet stuff with openfl. If not, is there anyone working on integration of flump? It’s super useful and easy for creating spritesheet animations that I’ve messed around with so far.