Created
January 15, 2017 17:37
-
-
Save andres-asm/b7972d6dfc0fe62c4dcaa68d999c8326 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Basic idea, when a netplay match is started an http post would be sent to a web server, something like this | |
| http://matchmaking.libretro.com/register?username="blah"?hostname="ipaddress"?port="port"?core="corename"?core_version="version"?gamename="gamename"?crc="crc" | |
| It would send subsequent keepalives every X seconds. | |
| The PHP or perl or whatever script would generate a simple "\n" separated list that can be downloaded, maybe periodically | |
| in the backgroud or maybe on demand. The PHP script would remove an entry after Y minutes or whenever the game changes for the same | |
| IP/Nickname combo | |
| Then a client could go to "Online" or whatever, hit refresh and it would display a list of the available games, hitting | |
| OK in that option would ask the user to look for the content file to load. | |
| The hurdles I see with this are: | |
| - loading content | |
| - figuring the public IP address from within RA | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minor twiddles:
gamename will currently always be blank (as indeed it is within netplay), but it's good to have it there. I don't think having the arguments be GET helps anyone, they should really be POST.
Hostname should probably not be provided by the client, or at least be optional. The server should get it from the connection and then, ideally, discover whether the port is actually connectable. If it isn't, for the moment it should just say so, but in the future it should offer a middleman connection. It's perfectly harmless to connect to a netplay port and then disconnect with no handshake.
Loading content is a big problem for netplay regardless, but I've designed the protocol to support on-demand loading even if RetroArch itself doesn't yet :)
Otherwise, this looks alright to me.