Home - GregorR/RetroArch GitHub Wiki

This is a fork of RetroArch intended to fix and improve its Netplay. The crucial fixes have all been merged upstream. See also my info on which cores are tested.

Todo

  • Infinite testing, of course!
  • Prevent changing pad devices while netplay peers are connected.
  • Server admin menu for kicking/demoting users etc.
  • Netplay input support for devices other than the simple retropad.
  • Other netplay modes: Master/slave mode, in which the client only acts on its own input when the server says so; and streaming mode, which is master/slave mode but with video/audio streaming instead of the actual core.
  • Maybe: Rewindless mode. This is strictly-wrong Netplay, but with frame CRCing, can work fine. If one disabled both rewinds and frame CRCing, one would be left with ZSNES-style netplay (no attempt at sync)
  • Maybe: Support for input grappling (two players controlling the same input device). Useful for e.g. handhelds. Certainly necessary for e.g. keyboards.

Done and merged upstream

  • Removed the "here there be dragons" sign that prevented anyone else from looking at this code.
  • Added a README that lightly documents how RetroArch's Netplay works.
  • Netplay ring buffer hardened to prevent overruns, which previously caused insane desyncs.
  • Ripped out UDP. Everything is done over TCP now. The previous implementation demanded reliability and in-order guarantees anyway, so UDP was just silly. Note that the protocol has also changed in more fundamental ways, so it's not really possible to make a "UDP or TCP" option except by having two incompatible implementations of Netplay.
  • Removed all limits on the size of the replay buffer. You want to allow 10 seconds of drift? 10 seconds of drift it is!
  • Made stalling work without blocking the UI thread.
  • General bugfixes to make Netplay bulletproof.
  • Remote pausing.
  • Stalling without rerunning frames. Netplay is now one of the many reasons the frontend may pause.
  • Support for loading state over Netplay.
  • Frame CRCing as a last resort for sync. Configurable by netplay_check_frames or the --check-frames option.
  • Deterministic player flipping.
  • Fixed spectator mode. In addition, it's now far more similar to net (normal) mode than it was before.
  • Netplay menu and support for launching Netplay on an existing session.
  • Savestate "quirks" API. Allows cores to describe the quirkiness of their serialization code so that frontend features can adapt. Particularly useful since many cores have session-specific savestates that cannot be transferred over the network.
  • Update all quirky cores to identify their quirkiness.
  • Compression of savestates when sent over the network.
  • IPv6 fixes
  • NAT traversal (UPnP)
  • LAN scanning for netplay hosts
  • Better (non-blocking) initial connection, to allow the serving port to be left listening indefinitely.
  • 2 player netplay.

  • Merge spectator mode into net mode.
  • Password-protected serving.
  • New alternative to delay_frames:
    • Keep running (window-based) average of frame runtimes to guess how many frames per second you're capable of rewinding.
    • Always buffer for a max of 60 frames (i.e., what was once delay_frames is now fixed at 60).
    • Stall if you're ahead by three real frames worth of replay frames (i.e., if it would be a significant stall to rewind for new data)
    • Let catch-up detection keep things generally in sync.
  • Remove conventional stalling. So long as all parties catch up, stalling helps no one. The server now demands stalling when one player is ahead and another is behind.
  • If netplay host is unset, pop up a dialog to request it when the netplay "connect to host" button is pressed.
  • Optional input latency to counter network latency.
  • Public matchmaking server (not written by me).
  • Netplay-based recording/replay.

Suggestions

  • Chat
  • Proto-matchmaking: Advertisement server.
  • Latency reporting ala tab menu in multiplayer games.
  • Faster netplay with delay_frames=0 by introducing input latency.