Sunday, 9 August 2015

What's the point of Adobe Flash now?

Don't get me wrong. I love Flash. I've used it since about version 4 and have created some pretty crazy stuff with it over the years. Back in version 5 I was re-creating pseudo-3d isometric puzzle games and as soon as xml sockets were supported, realtime multiplayer maze games (like Rise of the Triad and Doom). Flash could do some amazing stuff. And it did it all in tiny web-friendly file sizes.
To top it all, Flash could be embedded into PC desktop applications, for fancy menus in "real" commercial systems - it wasn't just an animated web banner tool (though that's probably what 90% of it's users were building with it).

But I tried using it recently to do some cool stuff I used to use Flash for, and Adobe have butchered it so badly that it's pretty much useless for anything useful at all now.

Until quite recently, I still used it to draw simple shapes and logos to create printable vector artwork for paper documents. I love(d) the drawing tools in Flash - they were so easy and intuitive. And it used to have a massive array of different output formats.

Quite often I'd make a drawing or a diagram for something for the missus, who still uses (MS desktop publishing software) Publisher. She could position it and guarantee it would print in all it's vector-y goodness, scaled and without jagged edges and so on. WMF and EMF were my favourite image formats for exporting.

Now Flash lets you export images in about three different formats, all of them rasterised. The only vector option is SVG. And even then, it rasterises gradients and embeds them as shitty 72DPI images. And, quite often, it doesn't even get that right. So it's rubbish for exporting images.

I used to create web apps using Flash, and all kinds of realtime socket-based clients, as it actively installed on something like 90% of all internet-connected devices (mostly PCs) at one time, across a wide range of browsers.

Then Apple decided that Flash was poo and in the kind of backwards step that we're still reaping the benefits from today (145Mb animated GIFs on the Google homepage over a 3G/mobile connection anyone? Because that's better than a 30kb animated vector file surely?) refused to support it.

There's no point getting into the whys and wherefores about why the Flash player couldn't be updated to fixed whatever Apple had against it - it's a long lost discussion - but hate it they did, and slowly Flash lost favour as a web-based development platform. It's still immensely powerful (or, at least, would be if you could get an older browser plug-in to work today) and still does stuff that todays' web-based technologies can only dream of (without consuming 100% CPU and locking up the entire device for 10-20 seconds at a time!). So Flash is rubbish for web-based apps.

Just as I was about to give up on Flash completely (I remained a faithful supported long after many other people had jumped ship to HTML5/jQuery or - shudder - Python for desktop-based apps) the first glimmer of good news came out, around about when Flash reached version CS5.5 - Flash could compile apps for native Android or iOS. Very exciting!

But Flash doesn't get access to many of the operating system functions and only a subset of them are exposed by installing and hacking "black box" pre-compiled ANEs (modifying is too generous a term, since they're usually badly-written with no support or documentation to speak of).

So if you want to create an animated, interactive advert and call it an app, Flash is great to get your content quickly onto a mobile device. But if you want to create a "serious" app (and access things like peer-to-peer networking, or control the rendering for your creation to use the GPU instead of CPU to avoid draining the battery and causing the entire handset to warm up from chewing up too many CPU cycles) you're out of luck.

In fact, for anything other than pretty basic interactive screens, Flash is rubbish for mobile apps.

One thing is was good at was interactive videos.
We're making one of those (although the interactive interface is a board game, not a series of buttons on the screen). So despite a brief dalliance with Unity, we thought we'd make far faster progress with good old Flash. 

Interactive videos and Flash - like two old friends back together after a ten year break. 
Flash introduced us to .flv video files, which supported background transparency. You could simply drop a movie onto your timeline, stick a bitmap behind it and you had an interactive movie!

Flash could even do "green screening" on-the-fly. In fact, it's almost ten years ago since examples like this ( were really capturing people's imaginatons:

If your browser will still play the embedded Flash file, have a play with the sliders and see how easy it is to "key out" background colours in videos at runtime.

This is just the thing we were looking for to get our zombie game coded up quickly, to create a working demo for our zombie board game. But it seems that Flash doesn't support transparent videos any more.

In fact, Flash doesn't even support .flv files any more. Adobe's official response to anyone who wants/needs to work with videos with an alpha channel is "use an older version of the software, that's why we made it possible for you to install multiple instances of Flash on your computer".

But the last versions of Flash to properly support alpha-videos/.flv don't compile mobile apps properly any more. So there's no way of creating a mobile/tablet (or even PC) app that can play a video with a transparent background. And since the example (above) was written using a really old version of Flash, you can't even import that and use it to build some runtime-chroma-key routines in the latest version - because later versions of Flash refuse to open anything that has any reference to AS2 in it at all.

So it seems that Flash is rubbish for making interactive movies too.

And given that Adobe has a massive suite of tools for doing things like drawing and animating and web development, it begs the question - "what's the point of Adobe Flash now?"

I think I'm going to cancel my monthly subscription. I've not really used Flash in over 12 months for anything more than quick-and-dirty prototyping, and I can't see it ever being used for a commercial grade project again.

And spend the next few days really getting to understand Unity properly, to see if that can do what I need - namely play a video with a transparent background over a scriptable background. Fingers crossed........