top | item 7449154

Flash is dead, long live OpenFL

271 points| lelf | 12 years ago |gamasutra.com

98 comments

order
[+] slacka|12 years ago|reply
For those not familiar with OpenFL, /u/larsiusprime posted a nice summary of how it's used:

"OpenFL is is a programming API that mirrors the Flash API, but in the Haxe language. So you take your old ActionScript code and port it over to Haxe (very similar language, but with additional features). Then you also take your Flash-vector-art SWF files, and you load it with the Haxe SWF library. OpenFL ensures you can still make all the same method calls to the Flash API, etc.

When you compile, you select one of many targets, kinda like unity: C++, JavaScript, etc. It conveniently packages those targets up into special configurations like "Android", "Windows", "HTML5", "Linux", etc.

So you can take your existing flash code and art, but get it running NATIVELY, in say, Linux desktop, with no need for the flash plugin or AIR runtime -- it's just a C++ app that does the same stuff (and much faster!)

You can also output to HTML5 so your players don't need the flash plugin anymore (the HTML5 target is still fairly new). As an end user, there's nothing for you to really do, except to wait for flash developers to switch over to it. From your perspective, all you'll really see is that instead of Flash apps on the web, there's more HTML5 apps. And instead of AIR apps for games on the desktop, they're natively compiled for Linux. What happened in these cases is that the developers were using Flash before but switched to OpenFL."

[+] tbrock|12 years ago|reply
So basically, the open source community made a better flash than Adobe did? That is rather amazing considering the resources of the respective groups.
[+] larsiusprime|12 years ago|reply
Context: I posted that description on the /r/linux_gaming thread to a user who initially thought that OpenFL was a plugin or something and was wondering "what they needed to do" to use it.
[+] xjh|12 years ago|reply
How does it do networking?

All I see in docs is a simple GET/POST request. Realtime multiplayer game would be very slow using it.

[+] TomGullen|12 years ago|reply
> I could try HTML5, but that precludes releasing high-performance desktop-ready games for Steam.

We develop Construct 2 (https://www.scirra.com) which is an HTML5 game engine. It can export to EXE via Node Webkit with very good performance, as well as the ability to export a multitude of mobile platforms as well.

One game we're excited to see released in the near future made in Construct 2 is "Penelope": https://www.youtube.com/watch?v=ZaynOYy2O54

The author is developing this game in Construct 2 for PC/Mac/Linux.

Some of our users have also submitted their games to Greenlight, here's a couple:

http://steamcommunity.com/sharedfiles/filedetails/?id=184459...

http://steamcommunity.com/sharedfiles/filedetails/?id=929949...

These are all HTML5 games!

[+] k__|12 years ago|reply
I like the ideas of C2, but I don't like developing on Windows and it seems like they won't release the tools for Linux soon.
[+] tomphoolery|12 years ago|reply
Thank you. I was going to come in here and say "Look I don't know if there are any HTML5 games on Steam, but how hard could it really be to package your game up in a fork of Chromium or WebKit?"
[+] ChrisGaudreau|12 years ago|reply
I remember using OpenFL a year ago or so. Probably less. The coding environment itself was very nice. But it was horribly painful in practice. Sure, you can compile to multiple targets, but don't expect it to work. And if it does work, chances are your code is littered with platform-specific macros and reams of platform-specific code.

To make it worse, many parts of the Flash API weren't implemented, had different semantics, didn't work on some platforms, or worked differently on some platforms.

I like the idea of OpenFL and I like the Haxe programming language. When I tried it, it was clear that things were improving quickly. I hope it has improved a lot since then.

[+] bendmorris|12 years ago|reply
I've been working with Haxe and OpenFL for about a year and a half. A year ago I would've agreed with you, but the past year has seen some major advancement in all of these areas. The Flash API is more fleshed out at this point. Setup still has some quirks but I find that once that's taken care of, compiling for multiple platforms "just works" and is incredibly convenient. For example, OpenFL will actually download and install the Android SDK and NDK for you, then compile your application and sign the APK with a single command. The most popular game engines (HaxePunk or HaxeFlixel) are great at smoothing over some of the platform-specific differences in things like rendering. It's not a magic bullet and you still need to have a basic understanding of each platform you want to target, but Haxe and OpenFL make things so much easier.
[+] zacharypinter|12 years ago|reply
> I've been a stalwart Flash developer for 15 years, so nothing bothers me more than greatly exaggerated reports of Flash's premature demise.

...

> I've learned my lesson -- whatever my next platform is, no-one should be able to take it away from me.

There's an interesting side discussion here. It seems to me that the rate of substantial changes in technology/frameworks/ui design/etc is increasing such that the expectation of finding a platform that you can hold on to for 15 years is becoming untenable.

I worked with Flash (via Flex) for several years and found it to be one of the best UI frameworks I've ever developed with. I have yet to find an web framework that matches the productivity of MXML and databinding for standard sorts of UI's.

I also use emacs daily, which is a piece of software that's older than I am and still going strong.

That said, when it comes to staying on top of technology rather than being made obsolete by it, I have yet to find a better strategy than to try to "ride the wave".

HTML5 addresses a lot of cross-platform issues and has a lot of attention today so it's worth learning, but I don't expect what I learn today to last forever. If/when VR takes off, we might all be focusing on 3D frameworks and a wealth of new UI primitives to support that ecosystem. Or, maybe some other technology will take the dev community by storm and it'll be worth going that direction.

In short: moving with the major paradigm shifts seems more tenable than trying to find/predict the stack that will last the longest. Very curious to hear if others have similar or alternative thoughts.

[+] alecsmart1|12 years ago|reply
Flash did what any other technology is still unable to do (maybe with the exception of java)- offer a true cross platform solution. Look at webrtc. Its been over a year now since the hype and we still don't have support in half the browsers. Till date no technology does audio/video chat as well as Flash.
[+] Kequc|12 years ago|reply
> finding a platform that you can hold on to for 15 years is becoming untenable.

I would think so. It only became clear that Ruby would be viable for jobs about 7-8 years ago. It is used absolutely all over the place right now, true. But it is going to be competing against Google's V8 pretty much directly, and that, well that is not winnable.

Adobe Flash has been around for so long that Wikipedia doesn't mention when. I remember flash on even the first web enabled computers. Everyone had it so they could play games on Newgrounds.

That is such an exceedingly long time ago, I don't feel like OP has very much to complain about.

[+] Toenex|12 years ago|reply
I have yet to find a better strategy than to try to "ride the wave".

My strategy also. I'm in my mid forties now and have always seen the language/platform as a way to exercise my development skills. Like many things the trick is timing, when to sit up and take serious notice of a new language/platform.

[+] larsiusprime|12 years ago|reply
Kind of the entire point of Haxe is that you don't have to find/predict the stack that will last the longest, because whenever the hot new thing emerges... you just add a new Haxe target for it.
[+] fritz_vd|12 years ago|reply
It's maybe a bit more polite to say: Flash is not dead, it now compiles to multiple targets :)
[+] sdfjkl|12 years ago|reply
It's not Flash that is dead, it's the whole concept of browser plugins. Too risky, too inconvenient, too often installed and then forgotten, never to receive security updates (or those that exist aren't installed because they prompt us about it far too often).
[+] andybak|12 years ago|reply
I'm not disagreeing but your comment makes it sound like you think OpenFL is still plugin based?
[+] leccine|12 years ago|reply
This is exactly why security conscious people don't use flash. Html is supposed to be a document and not an application. We created this Frankenstein with Flash, Java and JS to make HTML pages appear other than documents. The net result is that you need to install these plugins otherwise you can't get the full experience. The real question is why do we let people to abuse technology instead of using it well. I have disabled all of these plugins long time ago and also JS runs on very specific websites where it is an absolute must. You could install games through the browser, make it easier but to run through the browser, it is a bad idea.
[+] aiurtourist|12 years ago|reply
> OpenFL is an implementation of the Flash API written in the Haxe programming language.

Other than "Papers Please," who is using Haxe for production (i.e., making money on products built with it), and for what?

[+] larsiusprime|12 years ago|reply
1) Nickelodeon (using Flambe) -- web/mobile games

2) Disney (using Flambe) -- web/mobile games

3) Flambe (Haxe game engine)

4) reach3DX (next-gen 3D engine by Gamebryo)

5) Defender's Quest 2 (me) (HaxeFlixel engine)

6) Even the Ocean (Anodyne devs) (HaxeFlixel engine)

7) Rymdkapsel (Grapefrukt games)

8) Cardinal Quest II -- web/mobile (HaxeFlixel engine)

9) TiVo -- interface stuff I guess?

10) Tizen

11) Firefox OS -- just partnered with Flambe

12) Stencyl (Haxe game engine)

13) Motion-Twin (game studio that created Haxe)

14) Shiro Games (EvoLand devs)

That's just off the top of my head. So anyone using HaxeFlixel/HaxePunk/reach3dx/Flambe/OpenFL/Stencyl are all using Haxe-based game engines.

[+] jayrobin|12 years ago|reply
I can't speak for the big guys, but I'm seeing more smaller Flash game devs make the transition from Flash to Haxe, mostly for the ease of porting to mobile/HTML5.

I've been making Flash games on and off since about 2007 and finally made the transition to Haxe with my latest game [1]. As others have commented, it's not perfect yet (i.e. some features aren't yet available on all targets), but I'll never be going back to Flash now.

[1] http://www.iquitmustdash.com/

[+] camus2|12 years ago|reply
Flash is the plateform and the IDE, and nothing will replace the IDE regarding how easy to create and organise animations.

Sure,you can code in a text editor, But a designer cant do precise and complex animations with a text editor.

Editing and creating animations are 50% of the value of Flash and that's why the IDE is still necessary to develop games, wether they are HTML5 or mobile ones. Yes there is Unity but Unity is 1/ more expensive than flash 2/ sucks at 2d asset creation.

So no, Flash isnt dead,by a long shot.

[+] thefreeman|12 years ago|reply
Did you even read the article? you can keep using the Flash authoring tool and its native flash vector animations if you like

And the "dead" from the title refers to support from Adobe. The entire post is about how you can still target flash using OpenFL, haxe, etc.

[+] teach|12 years ago|reply
I must correct a minor error: "[Unity3D's] web browser target depends on a clunky plugin with a low install base."

This is no longer true. Unity3D can now (or very soon?) export to pure javascript and run in any WebGL-conformant browser without any plugins.

[+] larsiusprime|12 years ago|reply
To be fair, they announced that a day after the article was written :) And the feature is not yet released. I can update the article in a bit.
[+] cpeterso|12 years ago|reply
If you would like to see how Mozilla's Shumway SWF player is coming along, you can preview Shumway-rendered Flash content without installing the Shumway add-on in this gallery. Even works in Chrome and Safari. :)

http://www.areweflashyet.com/shumway/gallery/

[+] cyborgx7|12 years ago|reply
Well, this is new. This just logged me out of my Ubuntu session. It didn't restart, I just had to log in again.
[+] npsimons|12 years ago|reply
I like haXe, I really do, but for me, it's seriously lacking in libraries. It's all well and good to have everything you need to make games and displace Flash (everywhere!), but for instance, I can't just clone a GPX parser (https://github.com/tkrajina/gpxpy), pull in some other Python mapping stuff (http://sensitivecities.com/so-youd-like-to-make-a-map-using-...) and frontend it with another cross platform "language" (http://kivy.org/).

Big thanks and congratulations to the haXe developers, and I'll keep an eye on it with high hopes the library will expand!

[+] waneck|12 years ago|reply
With Haxe/Java and Haxe/C# you can use any Java or C# library directly from haxe (with -net-lib and -java-lib)
[+] perturbation|12 years ago|reply
From the default linux install script for OpenFL (http://www.openfl.org/haxe-3.1.1-linux-installer.tar.gz):

# Set up haxelib

                sudo mkdir -p /usr/lib/haxe/lib
                sudo chmod -R 777 /usr/lib/haxe/lib
                sudo haxelib setup /usr/lib/haxe/lib
This isn't as bad as I originally thought; I tested this, and only that directory itself is world-writable (the sub-directories from haxe install foo are universally readable and executable, but not writable). Still seems like someone could install a malicious 'dependency' ahead of someone else needing it.
[+] e12e|12 years ago|reply
Oh, I remember seeing this last time I looked at this. I generally don't like seeing sudo/su in a script like this at all -- and especially not something that goes an messes with LSB-locations like /usr/lib.

FWIW, the actual software is download by the script, eg: http://haxe.org/file/haxe-3.1.1-linux64.tar.gz

For something that is aimed at developers, one would think this stuff installed under /usr/local or /opt (benefit of /usr/local is that most(?) distributions set up PATH,MANPATH, various link/library paths etc to include /usr/local. Benefit of /opt is keeping the package well "out of the way".

World writeable directories without a sticky-bit is generally just wrong -- under /usr/lib it's pretty terrible.

[+] girvo|12 years ago|reply
Finally. I have loved using Flash for game development back when it was owned by Macromedia, and with AS3 it's still got a powerful API, but at the end of the day having an open-source implementation to work from is far nicer. It helps that Haxe is really cool, too.
[+] laureny|12 years ago|reply
Flash will be dead when web game companies (e.g. Zynga) stop using it.

It's still years away.

[+] erichurkman|12 years ago|reply
At least one major component is moving off of Flash: videos.

Now, if you opt to forgo Flash on your device, the most you seem to miss are some games and annoying banner ads.

[+] PhasmaFelis|12 years ago|reply
> I could try HTML5, but that precludes releasing high-performance desktop-ready games for Steam.

Oh Jesus Christ. Do not do this. "Flash" and "high-performance" do not ever belong in the same sentence. Binding of Isaac was a game that, visually, could have run on a Super Nintendo, but it chugged like a tired tortoise on a midrange 2010 laptop. I know Flash is popular, I know it's easy to develop with, but if you use it for "high-performance" game design you are cutting out a huge potential audience of low-end users, because it is miserably slow and inefficient. I should not need cutting-edge hardware to run a simple 2D game.

Edit: For vector games, at least. Raster games made with Flixel seem to run all right. But Flash's native vector implementation is Godawful and deserves to die.

[+] Macuyiko|12 years ago|reply
Every time I read an article about Haxe (and now, OpenFL), I get the itch to start working on a mobile game--just as a hobby project.

That said, does anyone know how well-suited these frameworks are for regular application development (or whether there exists alternatives)? I've been thinking about wipping up a mobile app, and while I could write the Android code, my knowledge of Objective-C is so limited at the moment that I'd like to avoid duplicating the same logic in another environment/language...

[+] thatnodeguy|12 years ago|reply
The problem with flash is the same problem as the .Net framework, Coldfusion and similar technologies.

You cannot have an entire ecosystem revolve around a single company and not have growth or compatibility problems. You simply can't.

What flourishes? Things like Linux, Python, etc because they can be flexible and adaptable. When you have a company in charge of a technology you will always be at the whim of that company and what they decide to do with it.

[+] davidgerard|12 years ago|reply
Flash is animation software. That people write games in it is a function of its past ubiquity and a symptom of the dangers of Turing completeness. Actually coding in Flash is unbelievably horrible. This is like an announcement of a well-supported cross-platform Brainfuck kit.
[+] fritz_vd|12 years ago|reply
Awesome overview. It's fairly easy to start with. Especially for 2D game. It compiles to JS as well fairly painlessly. Some difficulties occur when your start using oldschool Flash stuff such as "BitmapData" etc. Or fonts. But other than that it's pretty great.