Skip to content

Network Gamepad / Streaming Netplay (todo / guide) #2486

@andres-asm

Description

@andres-asm

So far the implementation works but there is no client, to test, set your network gamepad port to 55400 (just commited a fix that will set that by default) under network settings, and enable the gamepads for the players you want.

Should look like this:
gamepad

I open one port for each controller, so:
player1 = 55400
player2 = 55401
player3 = 55402
etc.

Then you can use any tool to generate traffic to send a character array that will be converted to the bitmask of the pressed buttons.

For instance sending "128" will be converted to 128 (with atoi) which means "press d-pad right", i guess there could be a better representation, also a better representation will be needed to send analog inputs.

To test I included a small test program that will send "128", sleep for roughly 1 frame and send 128 again, this should make a character move forward

To use it on the same host just compile it (set your port to 55400 in RetroArch to make it easier) and just run it.

gcc -o udp-test libretro-common/utils/udp-test.c
chmod +x udp-test
./udp-test

Todo:

  • support analogs
  • support some kind of authorization
  • make a builtin client in RetroArch (so one retroarch instance can control another one)
  • add an authorization mechanism

Second part would be to hook up the built-in ffmpeg sink to be able to stream a non post processed framebuffer (and audio) to get some sort of streaming netplay ala GameStream co-op


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions