starling icon indicating copy to clipboard operation
starling copied to clipboard

Network classes

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

I must found a easy good solution to make a massive game (1 million users) using RTMFP and multicast ip/application and remote sharedObjects. Do you think there is a chance to make it work with starling knowing that the soo HTTP3 webtransport will allow tcp and udp raw sockets?

ROBERT-MCDOWELL avatar Oct 14 '20 11:10 ROBERT-MCDOWELL

There is an open source server and client side RTMFP https://github.com/MonaSolutions/librtmfp

We could potentially add the Netgroup and related API to OpenFL but it will have to be a community effort.

I think its also worth noting that making multiplayer games with a p2p architecture is probably not a wise idea.

Also, as long as you have access to UDP you can initiate hole punching with a third party rendezvous server. You simply accept incoming udp, and then share that open udp socket with another connecting user and vice versa.

dimensionscape avatar Oct 14 '20 17:10 dimensionscape

Yes I know monaserver, but they don't really offer any rtmfp client side. They have also a forked ffmpeg with librtmfp implemented but need to fulfill the API options which I started but sadly no time to finish.

ROBERT-MCDOWELL avatar Oct 14 '20 21:10 ROBERT-MCDOWELL

btw RTFMP p2p is already a rendez-vous concept, I use AMS since years for that now.

ROBERT-MCDOWELL avatar Oct 14 '20 21:10 ROBERT-MCDOWELL

librtmfp is a multi-platform and LGPL library implementing the client part of the RTMFP protocol.

librtmfp is the client-end, by the same developers as mona. Yes, I only bring up UDP rendezvous because we would easily be able to implement as long as you have access to datagram.

https://www.rfc-editor.org/rfc/pdfrfc/rfc7016.txt.pdf

dimensionscape avatar Oct 14 '20 21:10 dimensionscape

do you think it would be possible to use this c++ library into starling? what about webassembly? I'm following the webtransport repo on github (HTTP3) and it seems that in Nov or Dec the release on browsers, nginx and apache will be done, opening the door to create TCP/UDP raw socket in JS. Could it be used to build the RTMFP protocol on top of this UDP raw socket?

ROBERT-MCDOWELL avatar Oct 14 '20 22:10 ROBERT-MCDOWELL

Well, we could use the C++ library as a reference along with the official RTMFP docs to create a haxe implementation that works across all platforms. This would be ideal.

dimensionscape avatar Oct 14 '20 22:10 dimensionscape

I'm also interested in bringing RTMFP to openfl and I'm sure Joshua would not be opposed to the idea. It's not something I would like to undertake alone though. It would need to be a collaborative effort. I just don't have the time to take it on by myself.

dimensionscape avatar Oct 14 '20 22:10 dimensionscape

let's spark it, others will follow ;)

ROBERT-MCDOWELL avatar Oct 14 '20 22:10 ROBERT-MCDOWELL