Multiplayer

Video decoding (for e.g. GameStream) has been removed from RetroPlayer because it used some private VideoPlayer APIs. I’m taking this advantage to redesign RetroPlayer for multiplayer support. Because this involves encoding and stream video, not just decoding, we basically get GameStream for free.

My design requirements for multiplayer RetroPlayer are pretty expansive. I’ll list them here:

  • Serverless, p2p design
  • Social discovery
  • Global discovery
  • UDP streaming for high speed / low latency
  • NAT transversal via ICE, STUN and TURN
  • End-to-end encryption via DTLS, SRTP and SCTP
  • “Heavy clients” (stream savestates and reconstitute video/audio)
  • “Light clients” (encode and stream video/audio directly)
  • GameStream support (accomplished by light clients)
  • Global spectator mode – basically p2p twitch
  • Multi-environment single player
  • Optional playback control (RW/FF/seek)
  • Random host negotiation
  • Auto-detect host negotiation for lowest latency or lowest bandwidth

OK, so “expansive” was an understatement. There’s a lot of complexity here, but I’m working on some abstractions that can manage all these points.

Let me know if you think anything should be added/removed from the list.