libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.1k stars 1.81k forks source link

Some general out of left field networking ideas #14158

Open LibretroAdmin opened 2 years ago

LibretroAdmin commented 2 years ago

@Cthulhu-throwaway Given all the amazing improvements you've made to the networking code, I've been brainstorming some more ideas that could help the user experience on RetroArch that still have to do with networking code -

The aim here would be to make the menu more of a 'live' place, like the Nintendo Switch homescreen where certain 'news' items appear onscreen. This way, the project can share new developments about RetroArch and cores to the user from within RetroArch.

This just serves as a RFC. By no means am I imploring you to drop whatever you are doing and focus on this, of course not. I'd very much prefer for you to continue working on the things that interest you. Just stating some general things of interest and ideas I had and just wanted to query where you stand on this.

ghost commented 2 years ago

My focus is netplay and that alone is a lot of work by itself.

The network side of this implementation should be easy enough. Implementing a HTML and CSS engine would be too much work; querying the server for news in JSON and then rendering it with what RetroArch already has should be simpler.

Example:

  1. Do a HTTP GET on http://example.com/news?count=10
  2. example.com sends the latest 10 news article in a JSON format.
    [
    {
    "title": "Some title here",
    "images": [
      "image 1 url",
      "image 2 url"
    ],
    "text": "Some text here"
    },
    ...
    ]
LibretroAdmin commented 2 years ago

Some kind of way to deal with JSON data is probably indeed the way to go. Would just have to see how the current Wordpress-based libretro.com could be changed to deal with that.

ghost commented 2 years ago

And by the way, not sure if you are aware, but the current implementation for the relay servers is universal enough that you can use it for tasks other than netplay.

One good usage outside of netplay is syncing data between two installations across the internet, where cgnats and firewalls might block proper communication.