ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

About network classes

Open ROBERT-MCDOWELL opened this issue 5 years ago • 15 comments

Hi folks,

does Ruffle is trying to fully support all Flash API network classes like remote SharedObject, RTMFP NetGroup and Multicast? I developed (and still) an 12 years big PhD project that involves all these classes and interact with AMS (as2/as3) and NetGroup/GroupSpeecifier/Multicast (as3)

Thanks and long life to this amazing project!

ROBERT-MCDOWELL avatar Jan 23 '20 23:01 ROBERT-MCDOWELL

Thank you for the kind words!

It's certainly within the scope of the project, and I hope to support these on desktop. However, I don't think it's possible to deal with a raw RTMP/RTMFP network stream using HTML5 web APIs, so that would be a non-starter on web. It could be tunneled through WebSockets, but this would require changes to the server.

We're still early in development, so this would be in the very long-term. Admittedly, many of these classes are outside of my area of expertise, so it'd be nice to have a contributor to champion these changes!

Herschel avatar Jan 24 '20 18:01 Herschel

The peer-to-peer stuff that RTMFP does could be tunneled through WebRTC, but I don't believe you could interop with Flash Player this way, and it wouldn't cover server communication at all.

kmeisthax avatar Jan 24 '20 19:01 kmeisthax

There is a project called mona server and they are actually experts of rtmfp https://github.com/MonaSolutions/librtmfp also a rtmp rust here https://docs.rs/rml_rtmp/0.3.0/rml_rtmp/ I know that UDP protocols is a big challenge but webrtc can support it for sure. if at least these classes can be used with another protocol it would be great and will do my best to contribute on it, but for now rust is like chinese for me :)

ROBERT-MCDOWELL avatar Jan 24 '20 21:01 ROBERT-MCDOWELL

^ Can vouch for MonaServer, you get compatibility with that and you'll cover a tons of ground for porting fast, scalable realtime multiplayer Flash games. Super Smash Flash 2 uses MonaServer/RTMFP for low-latency multiplayer and it's frankly the only solution that was viable.

Definitely agree it's a long-term thing though, since I imagine it won't be easy. But even if you can't interop with Flash Player I think it would still be worth the preservation effort.

Cleod9 avatar Jan 27 '20 15:01 Cleod9

Found RTMP crates lib here https://crates.io/crates/rml_rtmp

ROBERT-MCDOWELL avatar Feb 14 '20 11:02 ROBERT-MCDOWELL

This is an RTMP client written in as3, therefore easily translatable. It does not use netconnetion but uses sockets. Am I also trying to use rtmp in the browser without flash, alternatives?

ciaoamigoschat avatar Feb 15 '20 19:02 ciaoamigoschat

@ciaoamigoschat This is a rust library, not as3, for RTMFP it needs more research as webSockets are tcp only. I guest webrtc will be the way to go.

ROBERT-MCDOWELL avatar Feb 15 '20 19:02 ROBERT-MCDOWELL

Of course I know this, it was just to take inspiration. Bear in mind that rtmp is more used than rtmfp. The first step could be to implement rtmp, then give the possibility to:

  • create an rtmp player
  • allow remote share objects, etc.

ciaoamigoschat avatar Feb 15 '20 20:02 ciaoamigoschat

Rtmfp is much better than rtmp since it's UDP based, encrypted and most of all multicast and peer to peer serverless streaming. If you'd like to have rtmp code in As3 websockets so take a look here https://github.com/lucaslorentz/AS3RtmpClient and of course remote shared objects are also managed. Btw Ruffle goal is to strictly respect the whole Flash API and you are welcome to contribute your knowledge to the project.

ROBERT-MCDOWELL avatar Feb 15 '20 21:02 ROBERT-MCDOWELL

the rust class of udpsocket https://doc.rust-lang.org/std/net/struct.UdpSocket.html rtmfp protocol in c++ https://github.com/MonaSolutions/MonaServer2/tree/master/MonaCore/sources/RTMFP

ROBERT-MCDOWELL avatar Feb 18 '20 20:02 ROBERT-MCDOWELL

I had a few plans for basic RTMP with a similar project, tunneling through WebSocket. Ideally both projects would be compatible on the network side, so the WebSocket Tunnel could be used here as well. WebRTC for RTMFP also seems like a good idea. A good idea would be to figure out some sort of spec on how RTMP is tunneled through WebSocket, and how RTMFP/WebRTC would work, so that multiple projects (not just this, and the one I mentioned) can all utilise the same protocols.

chorman0773 avatar Feb 23 '20 13:02 chorman0773

here is other promising RTMP,RTMPS,RTMPT,RTMPTE,RTMPE classes in RUST https://github.com/valeth/javelin When I have time I will try to implement RTMFP (my favorite) in RUST, or maybe some other guys will do it.

ROBERT-MCDOWELL avatar May 17 '20 19:05 ROBERT-MCDOWELL

Any update on this? @Herschel

fp07 avatar Oct 17 '20 20:10 fp07

No update here, still much foundational work to do before this is any sort of priority.

Herschel avatar Oct 18 '20 02:10 Herschel

ruffle dev team, this repo might interest you https://github.com/zenomt/rtmfp-cpp

ROBERT-MCDOWELL avatar May 14 '24 02:05 ROBERT-MCDOWELL