Jump to content

Play minigames with the TV script


Recommended Posts

So you want to play games, but scripts aren't working or non-existent? Use the TV script!

 

 

kuwBpEq.gif

 

 

I've put together a quick and messy method to make this work. I'm expecting that this can be simplified, so feel free to comment on any improvements for this method! Its always better to make things easier.

 

Requirements

  • A property where you have mapping permissions
  • An (free) online platform for multiplayer games
  • Free open source software: OBS studio & VLC media player

 

In this example, I went for a functional pool table, and mapped it into a property (the item is incorrectly referred to a Billiard table 1 or 2 in game). I found a matching TV screen that fit the dimensions pretty well and mapped it so that the screen can display the game and blend in with the table well. Its not perfect but with some mapping this can be hidden entirely.

 

zTIWkSV.jpeg

 

 

Now lets a take a look at the concept to make it work

 

  • OBS studio creates a browser tab, or it streams an existing browser tab
  • Using OBS, adjust the streamed to hide menus and only stream what you want to be visible
  • using OBS, broadcast this to a virtual camera
  • Open the virtual camera source in VLC media player
  • Use Watch2Gether to take VLCs output and show it in game
  • Use the browser/platform or (OBS browser) to invite friends to play along!

 

 

The easiest way to start is to find a game platform that allows you to play for free, and invite friends. Bonus points go to platforms which are compatible with mobile browsers, so that other players can use their phone to interact with the game, if they don't have a second monitor available. A quick example I found was an open source project bloob.io, which has a pool game. This platform is just an example. Open a tab for this in a separate window and put it in fullscreen (F11 for Chrome), and then tab out of it.

 

In OBS studio, we can use this as a Window Capture source.

 

sjkjg9v.png

 

 

This doesn't give us the perfect fit yet, but we'll sort that out later when the stream is already working in game. Next, we can start streaming this window to a virtual camera, which will make Windows believe it is a webcam output. This is part of the basic OBS controls in the lower right corner. You may need to (re)start OBS studio as administrator to make this work.

 

vPbzfZX.png

 

 

Next, I tried to grab this source directly in w2g in order to broadcast it, but I found that it locked the aspect ratio to 4:3 for webcams, which was unsuitable for this situation. Therefor, I went to VLC media player as an intermediate. This program can pick up the virtual camera source by using Open Capture Device and selecting the OBS virtual camera source.

 

YVMk65J.png

 

 

You may have to play with the aspect ratio after opening the device. This can be done easily by just right clicking the video and adjusting it.

 

y7F3ILv.png

 

 

The TV script works using watch2gether (https://w2g.tv/) where you can create a room and use the /tv script to link to this page. Create a temporary room and attach this to the TV script in game.

 

BARVdZ1.png

 

 

In W2G, click 'Screen' in the left sidebar and select the correct VLC window.

 

8xhilQM.png

 

 

Make sure to then hit play afterwards.

 

 

GuZ99wi.png

 

 

This should now show the stream in game. Notice how its not correctly aligned.

 

G8XOtkd.jpeg

 

 

We will fix this in OBS, by using transforming the source, using Edit Transform when you right click the source. Whilst doing this, check how it looks in game if you need to align it perfectly.

 

 

4O1QjE5.jpeg

 

k2XuTCE.jpeg

 

 

 

Once you're happy with the alignment, you can start playing! In the case of this platform, you can use invite codes to send a link to another player, which allows them to join. Even on their phone.

 

 

WIgcG8s.jpeg

 

 

When set up correctly, it will even broadcast the sounds made by the game, and looks fairly immersive in game.

 

kuwBpEq.gif

 

 

This only shows an example for a pool table, but essentially this game be adapted to all kinds of multiplayer games:

 

  • Straight up multiplayer video games, if you can run or spectate them next to GTAW
  • Any and all table top games that are available online
  • Board games such as chess (like lichess.org), checkers
  • German-style board games such as Settlers of Catan
  • Tabletop RPGs (like roll20.net)
  • Card games
  • Tile-based games such as mahjong
  • Table sports games like table football

 

I'm curious to see what other things people can come up with!

 

 

 

Edited by mj2002
  • Upvote 8
  • Applaud 1
Link to comment
Posted (edited)

Some limitations

 

  • This method is limited by Watch2Gether, which is used by the TV script. This means there's a limit on the amount of people that can load the stream. I've heard of experiences where 30-50 people sent this script over the limit. I haven't tested this myself.
  • This method is limited by the TV script, which to my knowledge, only allows one stream per client, and one unique stream per property. If you want to use this to build some sort of interactive arcade business, then each TV/minigame will need its own property and its own (stream) host player
  • The usual limitations for the TV script apply, though I've found it very reliable myself.
  • The setup for the pool game above has additional limitations due to the platform. There seems to be a lack of a spectator mode and a player limit. Each online platform have its own limitations, keep this in mind.
Edited by mj2002
Link to comment

You still have to ALT+TAB to play the game? Am I correct? Or you found a way to play it somehow while in game? If it's playable while in game w/o tabbing to play then +, if not i guess it brings nothing but a show for watchers and that would be too much of a hassle to create only for that.

Link to comment
Posted (edited)
10 minutes ago, b777v said:

You still have to ALT+TAB to play the game? Am I correct? Or you found a way to play it somehow while in game? If it's playable while in game w/o tabbing to play then +, if not i guess it brings nothing but a show for watchers and that would be too much of a hassle to create only for that.

 

You need a browser to interact with whatever game you're streaming. Either you do that through your phone, or alt tab, or put the tab on a second monitor. The TV script doesnt allow for direct input. Its only streaming.

Edited by mj2002
  • Upvote 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...