Install

Install via the Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2962555373
Also install Five Pebbles Pong: https://github.com/woutkolkman/fivepebblespong

To manually install, download the most recent .zip from the releases page and extract it to "Rain World\RainWorld_Data\StreamingAssets\mods\projectionscreenwindows".

Next, enable these mods via the in-game Remix menu.

Credits

Thanks to forthbridge and his original Five Pebbles video player! This mod is just another possible implementation of the same idea.
Thanks to the Rain World Modding Wiki, without this site these mods wouldn't exist.

Description

A Rain World mod that can project any program on a in-game ProjectionScreen. You'll need a second monitor to display the window which will be captured. This plugin starts a background process which is basically Snipping Tool at 30 FPS. Also download Five Pebbles Pong, because this plugin is programmed as an add-on game.

Tested on v1.9.07b

Please report any bug, problem or feature request via the Issues tab, or on the Steam Workshop page, or message me on the Rain World Discord: Maxi Mol#3079

Decisions

  • Bitmaps are not supported directly in the plugin (System.PlatformNotSupportedException). So taking screenshots of other windows using the Win32 API is not possible within the plugin itself.
  • Using OBS Studio to capture video, and streaming it at UDP over the local network should be possible. Manually writing an UDP client and transforming every frame would become quite complex.
  • There's a OBS Client plugin by tinodo which can receive frames via obs-websocket protocol. This client is written in .NET 6.0, which won't be compatible with this .NET 4.8 plugin.
  • A separate independent console application in .NET 6.0 was created, which will catch the OBS stream and convert it to PNG, which the plugin can read.
  • This console application would send Base64 PNG strings to the plugin. The plugin then needs to convert this string into a Texture2D. This works fairly well, but it is definitely not the most optimised solution.
  • No in-game sound, this is probably played by the recorded program anyway.
  • Note that with this method, you won't get above 10-15 fps on the projection.
  • To increase performance, the Win32 API is used which would probably be faster at taking screenshots. This is added to a separate plugin, because I don't know if this plugin will be accepted on the Workshop because of security reasons. I was able to get max 35 fps capture on my potato PC and a window the size of Pebbles' room before frames are dropped.

Tips

  • Any issues? Check BepInEx logs located in "Rain World\BepInEx\LogOutput.log", or enable a console window in "Rain World\BepInEx\config\BepInEx.cfg"
  • Scale down other windows (& fullscreen off) for better performance, and for better visibility in-game