6 ms·
Three years ago, I had an idea to write my own Flash Player in Javascript, but I was too lazy to start working on it. Today, we have PDF.js, emulators of gamin
by IvanK_net 10y ago
Three years ago, I had an idea to write my own Flash Player in Javascript, but I was too lazy to start working on it.
Today, we have PDF.js, emulators of gaming consoles, or even emulators of a whole x86 computer, which can run Windows OS.
I believe that "SWF interpreter" in Javascript can run pretty fast. The specification is free available online.
The only problem I see is, that in Flash, you can create TCP / UDP sockets, which is not possible in a web environment.
- merb 10y ago> The only problem I see is, that in Flash, you can create TCP / UDP sockets, which is not possible in a web environment. You can send it to a backend via WebSocket, tough TCP/UDP proxy.
- Ph0X 10y agowho's running these proxies? The idea is to have a replacable flash player that works out of the box with all the flash content on the web.
- imtringued 10y agoYou can do it yourself.
- catshirt 10y agolike https://github.com/mozilla/shumway https://github.com/mozilla/shumway ?
- jim-greer 10y agoThere are some other things you can't do from the browser in addition to sockets. Full screen, camera, and microphone. But most games don't use that stuff.
- od14 10y agoThis is not true, all of the things you mentioned are possible in modern browsers and are being standardized. However some of them require permission from the user. (1) Full screen: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_... (2) Camera + Microphone: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices https://developer.mozilla.org/en-US/docs/Web/API/MediaDevice...
- tuxracer 10y agoThose things are all possible in the latest versions of every major browser. Web standards have come a long way!
- Sophistifunk 10y agoJavaScript also lacks (and apparently will always lack) a weak reference type, which Flash supports at the very core, for example weak event handlers.
- spyder 10y agoWeakMap? https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/WeakMap https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...
- bzbarsky 10y agoWeakMap holds a weak reference to the _key_, not the _value_. That's not enough to do weak event handlers, for example...
- Sophistifunk 10y agoIt can't be used because they refuse to allow iteration.
- altstar 10y agoYou can try flexjs.