[WIP] Twitch plays arcade bot v2

Been working on an updated Twitch plays arcade bot for the past few weeks based on the one I wrote a while ago but never finished and added the following features over the last few weeks. This is basically a rewrite as the old code base was severely outdated. The rewritten v2 version can be self hosted and how it works is that the host captures a window for the client(s) to play on.

The idea is to play games (2+ player games like arcade fighting / beat em ups  or any game that support multiple players) with viewers with less delay than watching the Twitch stream by using a browser while the viewers can watch the game on the broadcasters channel.

Features

  • game pad support
  • configure captured fps (set max captured window fps)
  • broadcaster to client fps (sets the max fps the hosts updates to clients)
  • scaling (scale & resize the captured window before sending it to clients)
  • enable sharpening (sharpens the finalized frames before sending it to clients)
  • enable captured window resize (when enabled it will capture the captured window 1:1 else you can resize to any size larger than 1)
  • enable max compression (sends the finalized frames as small as possible at costs of more CPU processing)
  • enable stream mode (finalized frames are send as they are captured)
  • enable broadcast (start streaming captured window to clients)
  • enable bandwidth optimization (skips sending frames that are the same previously)
  • enable client ready state (requires clients to send back a ping to tell the host they have processed the data before sending a new update)
  • enable packets mode (packs multiple finalized frames into one larger packet before sending it to clients to replays them in order at corrected time frame but this comes with a delay depending how long it’s set at)
  • finalized frame quality (quality of the captured window, 1 is lowest but also smallest data where 100 is 1:1 captured window but also largest data per finalized frame)
  • limit data to send (each finalized frames that is higher in size will not be send to clients, this means stuttering when there are many frames bigger than the set max size)
  • and other features not really worth mentioning yet I as work on implementing them first

 

Demo videos

PSP gameplay

Changes only in previous + current frame #1

Changes only in previous + current frame #2

Multiple clients test (locally)

FPS control
5 fps

15 fps

30 fps

60 fps

Ultra low quality + resized to 50% captured window

Medium quality + resized to 50% captured window

Bandwidth optimization on (total sent over ~6min)

Bandwidth optimization off (total sent over ~6min)

Config page to switch captured widow to broadcast (Not had time to write a proper one)

Herrow, I'm BlushyFace and here you can read about the (silly) adventures of Blushies, community projects and live stream highlights!
Consider a tip if you enjoy my content, thank you for the support!

Notify of
guest
0 Comments
Inline Feedbacks
View all comments
LIVE NOW! CLICK TO VIEW.
CURRENTLY OFFLINE
@Blushyface | All Rights Reserved - Blushyface.com