Gosh. It's awesome to see the progress! I was afraid this project would stall at AS2 and never really get very far with AS3.
I have such an ungodly number of fun old multiplayer games in AS3 that I'm dying to revive; but a lot of them rely on Matrix3D and Socket, (plus packages like Away3D and Starling)... I'm scared to try yet... I still have a laptop that runs Flash that I haven't let update for the last few years, just to be able to play my own games ;P
AS3 is one of those things where we needed to put in a lot of work just to get basic things working, because the runtime is a hell of a lot stricter[0]. On AS1/2 we could hook up a few basic things and have basic games working. Further complicating things was that a lot of under-the-hood things about frame lifecycle are different, in ways that took a while to fully understand.
There's a bunch of work going on with Stage3D that's pretty promising.
Socket support on the other hand is probably not happening since the web doesn't allow arbitrary TCP/IP sockets. You'd need to switch to WebSockets for Ruffle clients - fortunately we support `ExternalInterface` so mixing AS3 and HTML5 code is possible.
[0] AVM1 has no runtime errors aside from infinite recursion and infinite prototypes. This leads to some absolutely ridiculous consequences even for basic operations, like prototype-less objects sorting differently from ones with prototypes.
interesting... I always thought of AS3 as compile-time strict, which I miss about it. But I forgot all those additional (verbose) runtime errors...
> fortunately we support `ExternalInterface` so mixing AS3 and HTML5 code is possible.
Out of curiosity... it makes sense that WASM can't open an arbitrary socket, but couldn't there be a uniform wrapper for flash.net.Socket or NetConnection to talk via WebSocket or AJAX? (NetStream / RTMP seems mostly pointless now, since all those apps are long since dead; but NetConnection at the least is critical...)
Not to criticize. The work you've done is fantastic!
Wrapping Socket/NetConnection in WebSockets requires a cooperating server. Same for PeerConnection, which will also need all-Ruffle swarms or some kind of peer forwarding protocol for mixed Ruffle/FP swarms. So we'd have to have some kind of config option for "route this Socket endpoint to this WebSockets endpoint".
It might be easiest to allow the site running ruffle to provider a websocket via a call on the object. If the site hasn't setup the websocket to use, then the code can pretend whatever server the flash object is asking for just isn't reachable. If the javascript interface is just a packet shunt callback, then it's a bit slower, but the host could provide a local bit of javascript implementing a fake server if they wished ( to maybe fake a high score website or something long since gone that the flash thing required ).
PeerConnection, clearly, would be very hard. For NetConnection I was just thinking about basic REST calls. Almost all my AS3 game code starts with long polling to APIs and upgrades to a Socket.
The trouble with ExternalInterface (if I even remember) is that it makes you define custom methods on the Javascript side to link to active AS3 methods... I guess what I mean is could there be a common wrapper that sets up a web worker which can open either WebSockets or `fetch` / XMLHttpRequests arbitrarily and stream messages back and forth to a Ruffle class that implements all of the normal AS3 socket / NetConnection functions? Like, browser middleware in a worker to do all the outbound connections? I don't mean opening inbound sockets -- that was never really a feature of AS3 except through RTMP, and that's not what I'm referring to. I mean connecting up to server sockets. Maybe I'm not making sense or I'm too far out of this and need to just start tinkering ;)
> Socket support on the other hand is probably not happening since the web doesn't allow arbitrary TCP/IP sockets.
You can still do this with the help of an external server.
If Ruffle wants to talk to Ruffle, then the external server doesn't need to handle the traffic, and is cheap to run. If Ruffle wants to connect to something else, the external server will proxy the traffic. But even then, running this for the whole world is probably something that could be supported with ad revenue or donations.
I just did some testing, and Ruffle can now play Hot Throttle, the weird AS3 / Flixel based game we made for Adult Swim in 2011. This is great progress! Previous Ruffle versions just quietly failed. Unfortunately, the framerate during gameplay is still a bit slow on my M1 Pro-powered MacBook Pro, but I'm looking forward to the game being live on the web again soon.
Flash was an amazing platform and we should not forget it.
We lost incredible capabilities when Adobe abandoned it and Apple signed its death warrant. Moreover, we lost the best authorship tool of its kind. Nothing has ever been as easy to use, easy to deploy, comprehensive in capability, and complete in functionality.
Adobe let Flash languish after the purchase of Macromedia.
Google hated Flash since they couldn't index it and use it for making money. Flash also competed with YouTube for eyeballs. (In fact, one of my favorite analogies for Flash is to imagine if YouTube was interactive - that was Flash.)
Apple hated Flash as it undermined their complete control over their device (no runtimes).
Microsoft hated Flash because of the security flaws and how deeply their browser integrated into the host OS.
Creators, however, used it to make the best experiences. If you discount the awful splash pages it enabled, the work being done in Flash was leagues above the web games you see today.
I wish Adobe had donated it all (editor and runtime) to the w3c as open source. We could have started to iteratively polish it into a standard.
>Adobe let Flash languish after the purchase of Macromedia.
They didn't just let it languish. They actively tried to enshittify the platform by charging a revshare to game developers for using cross-compiled code with Stage3D. This was intended to stop Unity developers from just compiling Unity games to Flash and not paying for Flash CS6, except what it actually did was just push everyone to Unity's own browser plugin (and later HTML5 export).
As for why they didn't FOSS it... well, they're still selling Adobe Animate. The player probably couldn't have been released as FOSS, because of all the various libraries in Flash Player that Macromedia and Adobe used[0]. Remember that proprietary software is more viral than the GPL.
But they actually DID release a lot of FOSS during the AS3 days: the AS3 runtime and base class libraries were all Free Software, because Adobe and Mozilla were collaborating on it[1]. The intent was that AS3 would actually become "JavaScript 2.0" or ECMAScript 4! But this was killed off as being "too complex" and ES4 is just a weird alternate-universe ECMAScript spec.
[0] AFAIK there's Sorenson Spark, some Samsung font rendering library, some DRM stuff, and a few other things
[1] Originally they wanted to license the JVM but Sun was high on their "compatibility means compatibility" horse and said no. That's why ES4/AS3 has a lot of "Java-esque" features like namespaces and interfaces, and gets rid of prototype inheritance. None of that wound up getting forward-ported into the ES5+ fork of the timeline.
WASM welds powerful potential of advancement. However is limited to only those to who actually know what WASM actually is.
My mother learned flash at night courses, shes in her seventies and still creates flash galleries of her artwork to take to exhibitions. She wouldn't have a clue on what or even WASM is; nor any stranger in the street for that matter.
Flash gave anyone the ability to do anything with its simplicity. Without it, the way of the web has become limited. A great shame, a corporation playground almost.
We're still not to a point where we have the same capabilities Flash packaged together, and even if we were, we don't have the easy authorship tools to match.
Flash let you deploy a single file. That's unthinkably easy. No hoops. No transpiler builds. Everything about it was so simple.
The switch from a web where everyone publishes to a web where Facebook and YouTube dominate also helped kill it. I'm convinced Flash was ahead of its time and because corporations couldn't bank off of it, we murdered it.
The game stuff was truly neat. But flash was also used for tons of things like bank websites or other government stuff, employment stuff or even credit card payment system. Flash never worked well on anything but windows on x86 (32 bits). And it often burned CPU (and battery life) like nobody's business. Many ads in flash would just burn your CPU. It also had tons of security issues.
I remember being on Linux x86_64 and I couldn't load flash websited I had to use for some legal documents and feeling stuck.
So as much as the flash games aspect was neat. When flash died suddenly the web was more interoperable. Nowadays I never need to worry that I need Microsoft Windows on a specific hardware to navigate the web.
Different times though. In those days, Linux was seen as an hacker OS and the likes of Ubuntu were niche and nerdy. Those who use Linux today if lived in that time, I'd wager a large majority would of been running Windows. Windows x64 wasn't even a thing in mainstream.
Flash was in Adobe hands and when the Linux plugin arrived, Adobe could of pushed development. Patched the exploits, however it felt like days after the purchase they had started nailing the coffin shut.
It wasn't until Linux threatened the Windows OS later on that development for Linux really took off and corporations took Linux more seriously; long after Flash's coffin was nailed tightly shut. "Flash didn't work on Linux" was because Linux wasn't a usable desktop unlike to what it is now. When Flash was a thing, you still needed to configure X, lucky to have sound, and even then required configuring your screen, mouse and keyboard manually. I'm, not sure that NVIDIA linux drivers were even a thing then.
I would be starting to worry because with the recent antics with Microsoft and Windows 11, they don't want you to install any other OS. They want you to use WSL and that, I wouldn't trust with a toothpick. How long until you require a "WSL license"?
Firefox is tearing at the seams and soon we will see the web dominated with chrome only websites. Heck, it's already happening.
Flash was the OG 2D indie game engine before Unity happened.
Your assets went into library, movieclips were asset + code, themselves also part of library. You would script and combine those into higher level movieclips and those would be aware of each other by parent/children realationships. Those were prefabs before era of prefabs.
It was however also massively inefficient, to the point that this quality is one that I remember Flash the most for. I don’t miss random websites with flash ads and YouTube videos spiking CPU to 100% on my single core system, slowing everything down and spinning fans up.
Had Adobe fixed this (along with the numerous vulnerabilities) I don’t think users would’ve so eager to rid themselves of it.
That's the implementation, not the format (which is very well designed for low computing power.) You're right that Adobe made it worse, however; when it was still called Macromedia Flash, the hardware of the time was more than enough to produce smooth animations and interactive games with it.
Now we have Electron apps and other JS abominations doing much, much worse.
Flash made YouTube possible. Before Flash, sites and users had to worry about installing different codecs and video players, like Windows Media, QuickTime, and RealPlayer. Flash, pre-installed nearly everywhere, allowed YouTube full control of a ubiquitous, seamless video experience.
I think the parent comment may have been slightly exaggerating with their comment regarding game quality, but I certainly agree with them on the overarching point they are making. Around 2005 to 2013 there was an extremely vibrant and creative ecosystem around browser web games facilitated by Flash. Had Flash not died, and instead been allowed to flourish I think there would now be a huge market for web games that would co-exist alongside mobile games and steam, and I’d probably be using Flash to deploy games to all platforms.
Some great games at the time were N, Meatboy, and Quadradius. The were so many memorable, creative, boundary pushing, and subversive games. It was just really exciting being a part of that ecosystem as both a developer and a player. Aside from a few .io games I can’t really think of many non-Flash web games that are very memorable.
Flash was such a fast and creative tool to work with that you could pump out quality games extremely fast, which turn facilitated better quality in the ecosystem as a whole.
Edit: I should also mention that the most popular web game in recent years, Friday Night Funken, was made with a Flash based workflow.
You'd have to look through the archives of Newgrounds, but it was like itch.io with lots of content landing every day. That community created and popularised some things we take for granted now. For example Tower Defence games existed before to some degree, but I don't believe they would become a big genre without all the different flash variations. The low barrier to entry meant that you'd get hundreds of crappy knockoffs and 1 gem every week.
Personally I like Flashpoint [0] which is a webgame preservation project with a very sizable catalogue of archived Flash games from all over the web + a FOSS launcher app with support for all 3 major desktop OSs in one. It doesn't use Ruffle by default but there is an extension [1] implementing support for it.
If you were to take Ruffle and then create an open source creator, would that lead to trouble with Adobe?
As AS2 has been reversed-engineer that means you could create an editor right? Or would you need to branch and make a new "flash" scripting language?
The beauty of flash was that even with an install of a plugin, it worked the same everywhere. As Ruffle is an browser extension thats less faff then having to download a binary.
I guess what I'm saying is I miss flash and would love to see something rise upon the web again.
Adobe specifically released documentation under the Open Screen Project to counter accusations from Steve Jobs that Flash was a closed platform. The documentation we got is full of missing information, but it constitutes explicit permission to write this sort of thing. Even without that permission, reverse engineering and creating work-alike emulators is specifically allowed by several Ninth Circuit precedents. Google v. Oracle also protects us here, too.
The reason for this is that software copyright is very weird. Ownership over interfaces is, depending on what circuit court you listen to, either nonexistent or very very very thin. There really isn't an analogue of this for copyright on creative works[0] so it's hard to explain to nontechnical people.
You could use our SWF crate to generate SWFs, but the real meat of Flash/Animate's editor is the animation UI, none of which is part of the SWF spec or player. As far as I'm aware nobody ever made a good FOSS replacement for that. If you just want to program games all the AS3 tooling was released as Free Software by Adobe.
Ruffle isn't just a browser extension - that's just a convenient way for users to put it on old pages. Our real value prop is being able to put it onto your own website and have your Flash content just be part of the open web, even on iPhones.
[0] Which is why the Google/Oracle lawsuit was full of analogies to filing cabinets and Harry Potter chapter titles. I suppose the closest would be tabletop game rules documents, which are explicitly not copyrightable.
As far as I'm aware, no. When I joined in we already had our own graphics backends using HTML5 canvas and later WebGL with tesselation.
It's possible that Mike had tried using PixiJS at one point since he was working on Ruffle for several years before I found it. I'd have to hunt through the early Git commits to find evidence for this one way or another.
I thought it was some kind of device emulator for people to try on storage algorithms. But I'm more happy to see a long-dead Flash to revive in Rust! The word almost vanished from my dictionary in mind.
Amazing work going on here. Big thanks to the Ruffle team - runs most of my AS2 memories effortlessly along with some AS3 (seems to fall over for me with side loaded assets).
Just FYI if anyone is impatient and in need of an "unsafe" way to run flash with AS3, etc. you can still download a developer edition of flash player for Mac/PC via Wayback .. warts and all.
Ruffle looks really cool as well as flash and especially flash studio did, since it was a truly simple way to get complex interactions out. I've been even toying with a thought to at least try to prototype a similar tool, but nothing happened so far.
One question that I have though in case anyone has insights: how would you imagine a platform like flash to work on mobile?
With html it's solved with query expressions and css which solves the problem there - html is not a gaming platform anyway, more like a place to use canvas and webgl on.
With vector graphics and timeframes I don't see an easy way to do the same
Wow! --there's a lot of rose-tinted spectacles going on in this comment thread! Flash was a security nightmare, acessibility crippled, non-searchable, flashing bleeping abomination.
Maybe it wouldn't have been so bad if people had just stuck to making games and animations with it.
Yes - sorry it's a bit of a lottery which submission 'wins'. It's still on our list to write software to handle this better someday, i.e. share the credit and the karma.
I have such an ungodly number of fun old multiplayer games in AS3 that I'm dying to revive; but a lot of them rely on Matrix3D and Socket, (plus packages like Away3D and Starling)... I'm scared to try yet... I still have a laptop that runs Flash that I haven't let update for the last few years, just to be able to play my own games ;P