11 ms·
A Flash Player emulator written in Rust
- howenterprisey 6y agoSo here's a silly question. If you can just get the official "projector" from Adobe (Flashpoint's approach?), what's Ruffle for? (Edit: Removed the last sentence, which was unhelpful.)
- Shared404 6y agoIIRC, Ruffle can be embedded in webpages, which I don't think the official projector can do.
- txtsd 6y agoIt does not handle neopets games well yet.
- Lukesys 6y agoIs that possibly because in order to play the games in downloads the content on execution and I am pretty sure you have to be a logged in user to access the games.
- bryanrasmussen 6y agobut if it's written in Rust are they going to be able to emulate the security holes so you get the full experience?
- pjmlp 6y agoIf they target WebAssembly most likely, "USENIX Security '20 - Everything Old is New Again: Binary Security of WebAssembly" https://www.youtube.com/watch?v=glL__xjviro https://www.youtube.com/watch?v=glL__xjviro
- nynx 6y agolmao, only if you write something other than rust
- fulafel 6y agoThere's a lot of unsafe usage in this codebase (https://github.com/ruffle-rs/ruffle/search?q=unsafe https://github.com/ruffle-rs/ruffle/search?q=unsafe returns 5 screenfuls) - though I don't know enough about Rust to tell how risky these are.
- emi2k01 6y agoAround 3.5 of those pages are unsafe uses for implementing the same trait for garbage collection. The implementations seem very simple and the documentation mentions invariants that are easy to hold so it should be easy to recognize an unsound implementation. I think that it should be possible to not use unsafe at all for some of those but I only skimmed over the code so I'm not sure. Most of the rest of unsafe uses are to skip rust checks that have already been asserted and for FFI which is unavoidable. There are only a few unsafe uses whose invariants are not well defined. I only gave it a quick look but I doubt they're risky. Even if an attacker manages to exploit ruffle, I wonder what could they do in a WASM sandbox in an isolated domain.
- kibwen 6y agoIn this context any usage of `unsafe` in Rust is probably irrelevant to the safety of the resulting program, because AFAIK the WASM sandbox doesn't trust programs enough to actually allow them to do anything that could potentially violate memory safety.
- fulafel 6y agoYep, in a lot of use cases the wasm version probably is fine with the browser sandbox. But according to the readme this also targets the desktop. I would imagine the desktop mode is native code + wgpu, as there seems to be a wgpu directory under renderer/ . There are some scenarios when vulnerabilities in a wasm compiled program can be harmful too though. For example the web page embedding the emulated flash applet doesn't necessarily intend to give that app full access to that origin's context. For example it could exfiltrate some api keys or other security tokens of the logged in user of the containing page.
- josefx 6y agoJust run it on an Intel processor with some modern RAM.
- dleslie 6y agoI'm excited for this; flash is still wholly unmatched as an artistic expression tool. HTML5 and WebAssembly can, obviously, provide the technical chops; but we've never recovered the experience of a novice Flash user who, with no prior domain experience, could realize an inspired prototype game or entertaining animation in less than an hour. The tool was just that accessible, and the community that good.
- jayd16 6y agoWhats missing from modern tools?
- danbolt 6y agoI don’t think anything feature-wise is missing on the runtime side, but Flash’s keyframe/editor setup just let people make the most amazing things.
- gabereiser 6y agoStickdeath comes to mind. 2advanced studios work. All the amazing bitmap effects. Flash was really easy to create interactive scenes as your site. Each one different from another. Each one a masterpiece of art and layers and effects taken from gaming and VFX/Film. I miss that. Don’t get me wrong, I’m glad flash it dead, but I really miss the beautiful sites it enabled.
- coldtea 6y agoIsn't Adobe Animate the same thing, keyframes and everything, just with html output?
- daypay 6y agoCan't wait to play Runescape in the browser again.
- McDev 6y agoThat runs on Java unfortunately
- etaioinshrdlu 6y agoThere are actually a good number of ways to get Java to compile and run in a browser. It should be OK, perhaps the 3D or other advanced API's may be a mess however.
- systemvoltage 6y agohttps://en.wikipedia.org/wiki/Orisinal https://en.wikipedia.org/wiki/Orisinal Can we revive Orisinal? I used to spend hours on their games: https://wsa-global.org/winner/orisinal/ https://wsa-global.org/winner/orisinal/
- adrian17 6y agoWith the Ruffle browser extension, it appears that most of the games already work (at least the random sample I checked).
- ink_13 6y agoI first heard about this project when it saved homestarrunner.com from the dead. I'm glad it exists, there's a lot of 2000's-era web history wrapped up in Flash.
- IshKebab 6y agoHomestarrunner was mostly not interactive so they could have just converted everything to video (I bet it is on YouTube already).
- ygra 6y agoIt is on YouTube. But there's a _lot_ of Easter eggs in the Strong Bad Emails that rely on interactivity which are lost in the video.
- mlindner 6y agoConverting vector images to raster images forever fixes the resolution of the images. Also flash can be much higher framerate than a fixed raster video framerate.
- villgax 6y agoPlease FFS let flash die a peaceful death
- imhoguy 6y agoPlease not. Such projects are essential for historical preservation. Shall we let C64, Atari die too and stop improving emulators?
- Shared404 6y agoYeah, Flash-the-platform can die for all I care. Flash-the-content needs to be preserved, and Ruffle seems like a promising step towards that.
- deleted 6y ago[deleted]
- pvg 6y agoPreviously: https://news.ycombinator.com/item?id=25242115 https://news.ycombinator.com/item?id=25242115 https://news.ycombinator.com/item?id=20728019 https://news.ycombinator.com/item?id=20728019
- acidburnNSA 6y agoJust tried it out on all my flash animations and games I made in 2005-6. Haven't busted those out for a while. What a throwback. Handled them all pretty well except for one game that loaded images of my friends. Must've had the image files not embedded or something. Great work, and thanks!
- lxe 6y agoQuite a few things on Newgrounds are actually running on Ruffle!
- cyborgx7 6y agoI was confused why some old flash games, that I couldn't play since I ditched flash, suddenly ran again when I looked them up randomly again. I think I just found my answer.
- jtwaleson 6y agoOk, funny story about ruffle: Years ago in 2012 some co-workers stumbled on the greatest website ever: http://www.novalight.net/NOVALIGHT.html http://www.novalight.net/NOVALIGHT.html (takes a while to load now) To prove that HTML5/CSS3 was finally ready, I started a side project to recreate it in JS: https://github.com/jtwaleson/NovaLight-Challenge https://github.com/jtwaleson/NovaLight-Challenge . I never got far and I don't know if that means I never finish side projects or if Flash is officially superior to HTML5. Anyway, the owner of the original site found it and emailed me his appreciation and I think we both had a good laugh about the situation. Two weeks ago he emailed me again to ask if I could maybe finish the project because flash is now dead, and the site is part of his legacy etc. Instead I slapped ruffle.js on it and everything is back up! It's quite slow to load, but apart from that everything looks great! Ruffle is an amazing project :)
- kthxb 6y agoAwesome page, and it even works flawless on mobile.
- mstade 6y agoTook a while to load, but absolutely worth the wait!
- deleted 6y ago[deleted]
- bigdict 6y agoI couldn't stop laughing at this page, so dramatic.
- smcl 6y agoI googled Peter K Joneleit after your description of him in the README and I was curious if you were just having a bit of fun or if he was involved in defining these web standards. Hooooo boy I was not prepared for his Twitter, it is wild
- 6y ago
- bArray 6y agoBring flash support back to the web! Would be awesome that if that not only are they able to emulate the flash media player, but also fix the security issues too. Perhaps that's naturally what an emulator will give you? We should probably also be thinking about how browser support may continue for JavaScript in the future too. It's a matter of time until WASM reaches mainstream adoption.
- loup-vaillant 6y agoWhat do you mean, a Flash player emulator? There's no real CPU to emulate in the first place. Shouldn't we call that a Flash player? Or is this because of trademark or something?
- throw_m239339 6y agoYou're right it is a unofficial "flash player". I guess the original player was some sort of VM since it ran some byte code.
- lxgr 6y agoTo get to 100% fidelity, there'll be a Windows XP + IE 6 on x86 emulator in there sooner rather than later.
- dikei 6y agoI hope this fare better than GNU Gnash. Back in university, my friends and I had a team hacking on Gnash to try implementing an OpenGLES renderer for a class project. We never got it finished, due to the lack of documentation and our poor reading of C code.
- nevi-me 6y agoOur Revenue Services got caught out with the Flash EOL. Their solution was to provide an Electron-based web browser, to much embarassment from those who could peek under the hood to see. It looks like they decided to bundle an older Chromium version that still supports Flash. I wonder if ruffle could have saved the embarassment, and worked as a safer stop-gap measure.
- Vespasian 6y agoGreat project! To be honest I'm slightly annoyed whenever a github submission mentions the programming language for no specific reason. Rust is a great tool but it doesn't matter unless you want to participate in this project.
- schwartzworld 6y agoOf course it matters even if YOU don't want to participate. The techy types that frequent here may actually want to contribute, or be interested in how the code was implemented as a learning resource. Additionally, there are biased for and against programming languages, and I guarantee that there is a whole set of people on HN that would be interested in this project because it is a language they like. Rust means you can run this software almost anywhere and it's going to be easy to install.
- Vespasian 6y agoI guess that's true and I shouldn't comment that "early" in the morning ;)
- vfclists 6y agoPeople think of it as being for games, but high quality applications used it as UI, a lot still do. Flash was banned to protect the Google, Apple, Microsoft ap ecosystems. Todays mobile CPUs are an order of magnitude way more powerful than those of 10 years ago. The performance issue doesn't apply now. As for bugs, they can be fixed and they could have been fixed with the passage of time. The whole agenda of aiming to replace Flash with HTML5 and CSS was a dishonest fraud from the get go. 10 years on now and still nowhere near what was available 10 years ago.
- lxgr 6y agoI miss Flash too, but I don't miss the fact that the runtime was only available from a single vendor and only in binary form for the platforms they deemed important. The performance issue was never the main problem.
- macspoofing 6y ago>Flash was banned to protect the Google, Apple, Microsoft ap ecosystems. No. There was always a lot of Flash hate around, but it was tolerated because prior to HTML5 set of standards and the massive investment in JS performance, there was no way to do certain things in HTML/JS, so there was space for Flash. Post 2010 it became hard to justify Flash because you could now replicate everything Flash could do (though maybe in a more clunky way). >10 years on now and still nowhere near what was available 10 years ago. I wouldn't say that. There is no good reason for Flash to exist anymore. The culture also changed. The younguns who were writing browser-based Flash games in 2004, are writing mobile games today, and the browser is not a popular gaming target anymore (with some exceptions here and there).
- vfclists 6y agoThe browser is unlikely to be a target for writing games it is crippled as a medium for playing games, or as you put it in a "more clunky way". > The younguns who were writing browser-based Flash games in 2004, are writing mobile games today, and the browser is not a popular gaming target anymore (with some exceptions here and there). Don't those games have to be sold though app stores where Google and Apple take their 30% cut? On the question of a "more clunky way", how come 10 years after Flash was banned, despite improvements in hardware performance, HTML/JS capabilities and development tools have not evolved to surpass Flash? Could that be because the companies that control the apps stores are the same ones in charge of the HTML/JS standards, and even neglect to implement some of the standards when they might make games and animation development "less clunky"?
- ChrisSD 6y agoI wonder if something like Ruffle could one day be used to automatically and losslessly convert Flash files into other formats?
- anthk 6y agoThis is not an emulator.
- 101008 6y agoI helped restoring JK Rowling official website [1] from 004 to 2010, which was entirely in Flash. It was a reproduction of her desktop / house, with a lot of fun sections, secrets, easter, eggs. After years rebuilding it (with swf files, decompiling them to understand the Ajax calls, etc), browsers announced they were going to stop supporting Flash, so all the hard work was almost useless (a few people saw it and loved it, though). I tried Ruffle but unfortunately it still doesn't support all the original Flash features, so most of the website is unusable yet. But I wait for the way when they complete it and the website can be browseable again. [1]: https://www.therowlinglibrary.com/jkrowling.com/en https://www.therowlinglibrary.com/jkrowling.com/en
- wentwrong 6y agoI just thought that it would be nice to have a site like "You Might Not Need Jquery" (http://youmightnotneedjquery.com http://youmightnotneedjquery.com), but one that helps to find alternatives to Flash features.
- macspoofing 6y ago>Ruffle is in the proof-of-concept stage and can currently run early Flash animations and games. Yeah. Just like the 10,000 other Flash implementations. The problem is that SWF is very complex format and relies on proprietary codecs. Also, there are multiple runtimes to support. Like all attempts before it, simple cases will be covered but anything slightly more complicated will never work.
- steveklabnik 6y agoGiven the folks sponsoring the project, I have higher hopes for this than you do.
- macspoofing 6y agoI've seen this before, going all the way back to Gnu Gnash all the way up to Shumway (which was functional in the same way all the others were). The simple parts, typically the things from the AS1/AS2 world, are simple. As you get into the AS3 world there's a drop-off. I don't see anything in this project that hasn't been done before.
- steveklabnik 6y agoI am not aware of the folks behind Gnash, and Mozilla obviously cares about the web, but I don't think either of those organizations have the dedication to Flash that Newgrounds, or even the NYT, have. Time will tell I guess.
- macspoofing 6y agoIndeed. I was tracking a lot of these projects a few years ago because we had a Flex/AS3 RIA (remember that term?) so I was hoping we'd get a freebie port to HTML/JS. In the end, we ended up writing our own AS3->JavaScript transpiler[1]. The Apache Flex project has since done something similar, though by the time that was done, we were done. So my skepticism stemmed from just seeing these projects come out, get some quick wins from implementing a simple subset of swf, and then just go nowhere. But I wish them well. I hope it works out. [1]Well, not totally ours. We used the existing Falcon compiler front-end and we wrote the emitter to transpile to TypeScript (after implementing a subset of Flash SDK that we needed).
- karmakaze 6y agoI read the title three times to decide it was saying it's emulating a Flash Player. Seems I was wrong, it is a Flash player, or you could say it's a Flash interpreter. It doesn't take a specific Flash Player and run it in emulation. That seemed viable to me, the OS support needed wouldn't require any specific knowledge of Flash/ActionScript which is horizontally portable from/to non-flash things.
- faitswulff 6y agoI went looking for the original xiaoxiao stick figure fighting swf to load into the demo and found out that Albino Blacksheep is already using Ruffle in production: https://www.albinoblacksheep.com/flash/fight1 https://www.albinoblacksheep.com/flash/fight1
- jgalt212 6y agoIf this can play Elf Bowling, I'm in.
- ChrisArchitect 6y agoyou know what we need? This implemented a bit further so it can be used to restore lost Flash screensavers. So much art and creative coding went into making some amazing screensavers a few which I still used up til Flash's nixing off Windows in January.