
Gordon: An open source Flash runtime written in pure JavaScript - r11t
http://github.com/tobeytailor/gordon
======
axod
Quick link to demo:

[http://github.com/tobeytailor/gordon/raw/master/demos/tiger....](http://github.com/tobeytailor/gordon/raw/master/demos/tiger.html)

Wish people made github pages a bit more friendly. It's like being thrown into
a pit of 1s and 0s.

~~~
ronnier
Demos posted here: <http://paulirish.com/work/gordon/demos/>

~~~
knv
All three of them crashed my Chrome 4.0 tab.

------
kqr2
Just in case anyone was wondering about the project name and is not too
familiar with classic science fiction:

<http://en.wikipedia.org/wiki/Flash_gordon>

~~~
Raphael
Flash! Ah ah. He's a miracle.

------
mcav
The demo uses 1/3 as much CPU as a similar Flash app would on my Mac. Very
cool.

~~~
mortenjorck
I'm not sure if that says more about the poor optimization of the Mac Flash
plugin or the great optimization of your browser's (Safari? Mac Chrome?) JS
interpreter.

Probably both.

~~~
tedmielczarek
There's a lot more overhead to the plugin model, since the browser has to call
to the plugin via NPAPI and the plugin has to draw itself separately, vs. just
being integrated into the normal reflow/repaint of the webpage.

------
varjag
Flash Gordon: Worst Search Engine Terms Since A* Algorithm

~~~
mrcharles
I always thought a good anti-piracy measure would be to name your TV Show /
Band / Game "The".

~~~
phsr
I always thought it would be funny to have a band named "Those Guys" and the
first single would be "That Song"

Asking someone if they heard the single would thoroughly confuse people "Have
you heard That Song by Those Guys?

~~~
asjo
Sort of like Van Morrisons band "Them" and of course "The Who"?

------
abstractbill
Of course it's damn impressive, but it doesn't seem very _useful_ to me.

Nobody uses Flash for the language (actionscript is a terrible mash-up of
javascript and Java, and haXe is not a lot better), or because we think the
virtual machine is awesome in some way. Simply, we use it to bridge the gap
between what web browsers can do and what native apps can do (access to
webcams and microphones, local files, real tcp/ip sockets, etc, etc).

Having said all that, who knows - maybe web browsers really will eventually
bridge those gaps themselves, and this will just be used to run legacy Flash
code. It's possible I guess.

~~~
jacquesm
I invite you to switch your flash player off for a bit and see how many sites
use it for all kinds of stuff.

It's a nuisance but it is so pervasive it's not even funny.

~~~
artpop
I already have, it is wonderful.

<http://github.com/rentzsch/clicktoflash>

------
flog
This was my 2009 new-years prediction... damn it, just out! The best demo is
<http://jancona.com/gordon/demos/blue.html>

~~~
peregrine
If you double click it it will kill Chrome. AW SNAP.

~~~
Slashed
Don't know. Works fine for me..

~~~
peregrine
Probably cause I am using the Dev build. Oops, time to submit a bug report.

~~~
Slashed
Actually, I'm using Dev build as well.

~~~
pavs
Same here. Nothing happens. No Crashes. 4.0.288.1 stable build

------
hendler
Has anyone tried this out? Is it more than a toy?

README says little <http://github.com/tobeytailor/gordon/blob/master/README>

~~~
chipsy
<http://wiki.github.com/tobeytailor/gordon/demos> The demos are basically
graphics tests: vector drawing, frame-by-frame animation, tweens.

[http://wiki.github.com/tobeytailor/gordon/swf-tag-support-
ta...](http://wiki.github.com/tobeytailor/gordon/swf-tag-support-table) The
tag support table shows just how much is missing: everything from SWF 2
onwards! Many of those tags aren't feasible in pure JS right now, anyway.

~~~
lt
Interesting. Those work nicely using Safari on my iPhone. Looks promising.

But on Chrome 4.0.288.1 dev moving the mouse over any of the animations
crashes the tab.

~~~
city41
The demos don't work at all in IE8.

~~~
gcb
also nothing with opera 10

------
duairc
Does this actually implement the equivalent of Adobe's Flash runtime in
Javascript? Does it work for all SWFs? If so, is there some sort of magic
involved? If this works, how come things like Gnash and swfdec have never been
able to achieve full compatability with Flash, yet this has seemingly come out
of nowhere and done just that?

------
leoc
"Dispatch war rocket AJAX to bring back his body!"

------
galactus
I had already used the name for my lisp flash library :( <http://wiki.freaks-
unidos.net/gordon> (not that it is a very original name or anything ;))

~~~
mahmud
Dude!

Where on bloody earth have you been? Could you please MIT the source code for
Gordon so we can work on it?

People refused to touch it because of the license.

~~~
ash
What's wrong about LGPL?

------
funkdobiest
Too bad the name is already used for a flash decompiler
<http://www.futurecandy.net/>

------
timf
Cool technology to pursue but considering how Flash content's CPU requirements
are often a problem on C-based interpreters, this doesn't seem like a
practical thing.

~~~
jacquesm
When you see a pig dance it is impolite to comment on the quality of the
dance, but you can express amazement at that it dances at all ;)

Let's give them a bit and see how far they take it. With a bit of luck they
get some help from a nifty jit for js and who knows what might happen.

The evil .swf might turn in to a standard component after all, if only via a
somewhat roundabout way.

I really wonder how they're going to do audio though, and capture devices and
such are probably out (I can see a route to do video via the canvas, it's
going to be bloody slow though unless js gets sped up a lot compared to where
it is today).

~~~
uggedal
If the new HTML5 <device> element gets implemented they could use that for
capture devices: [http://www.whatwg.org/specs/web-apps/current-
work/multipage/...](http://www.whatwg.org/specs/web-apps/current-
work/multipage/commands.html#devices)

~~~
jacquesm
Yes, I can't wait. I've been waiting for that literally for years.

Many years long we used a crappy old little javascript that I wrote long ago,
it basically loads jpegs under water in to an off screen buffer and then flips
them over the previous one when they're.

Using some trickery I could get pretty good framerates if the connection is
good but the bandwidth cost is just terrible.

Now we've switched to (yuck) flash and it works ok I guess but something more
standardized would be much appreciated.

------
dflock
This leaks memory like a sieve on Chromium, unfortunately. Be very interested
to see where this goes eventually though.

------
wensing
SWF files on the iPhone.

~~~
abstractbill
But not _useful_ SWF files on the iPhone. This doesn't magically give you
anything you didn't already have in javascript.

~~~
mortenjorck
Yes, but that big Flash site you just finished with no budget for an iPhone
version just got a _lot_ cheaper to re-target.

~~~
catch23
not really, if you're writing flash apps, there's a huge chance that you're
actually writing as3 code, which gets compiled into DoABC tags (actionscript
bytecode) and I don't think DoABC tags will ever be supported unless they
implement a stack-based virtual machine in javascript.

It gives the appearance that it got cheaper to re-target, but really it will
be a ton more work when you realize what will never be supported. Even if they
managed to implement a virtual machine in javascript, they'd still need to
implement all the library code that normally doesn't ship with every swf file.

------
gcb
Great! now people will go back to blocking JS to avoid ads like the old days.

All that easy ride of blocking just the flash player left the web all screwed
up with that JS for content running loose.

Good ridance, ajax.

