How arcade memories, browser emulation, WebRTC and a questionable amount of curiosity became Virtual Couch.
The idea remember when multiplayer was simple?
You sat next to someone, handed them the second controller and played. When i was younger use to play in the arcade machines with my little brother trying to beat this game:
And then as I grew older I started playing on different consoles ahhh the golden age of gaming Sega Genesis, the good old days of Mame 32 and a lot of others out there.
No matchmaking. No party systems. No accounts. Player 2 was literally just the person sitting next to you.
I missed that to be honest growing older now I missed the days of talking nonsense with friends while playing alot of these old school retro consoles. Then came multiplayer and even though its awesome to play multiplayer games it just doesn't have that thing that couch gaming had.
So naturally, instead of accepting that my friends and family aren't always sitting on the same couch, I decided:
Why not make the couch remote? (As a side note this project was dam difficult)
YOHOHOHOHO 😂
That's where Virtual Couch started. Even though a lot of the stuff is there for example netplay which is awesome but can become hella confusing and at times very technical.
So what exactly is Virtual Couch?
So before i give my explanation first off want to give my shout out to the following:
jminor
/
webremoteplay
WebRTC-based Remote Play - play local multi-player games when you're not local.
Web Remote Play
WebRTC-based Remote Play - play local multi-player games when you're not local.
Some games support local multiplayer via keyboard, multiple gamepads, etc. but only if all the players are gathered around one computer and one screen. This project allows you to play these games with friends who are far away, sitting at a different computer.
This code was co-developed with Morgan McGuire: https://github.com/morgan3d/misc/tree/main/jsremotegame
Proof-of-concept
This is just a proof-of-concept. Hopefully it gives you an idea of how this could work, so it could be incorporated directly into your web games, fantasy console, canvas art project, or whatever :)
Here are key features that are missing:
- Gamepad support
- Controller remapping (e.g. assign your keyboard to player 2, 3, 4, etc.)
- Mouse move events
Working Demo
- Choose one of the demos here: http://pixelverse.org/experiments/webremoteplay/
- Click the text to start a demo game.
- Notice that the URL changed to include an…
PiterWeb
/
LibreRemotePlay
✨ Free and OpenSource Steam Remote Play 🎮 Alternative powered by WebRTC 🌐and Web APIs
LibreRemotePlay
Important
The software for the moment is very experimental, may not always work an all systems. If you find a bug you can report it on issues page or discord.
Note
If you are interested in contributing (code/translations) you can follow this guide
An open source, free (as in freedom) and P2P alternative to Steam Remote Play
-
Website 🌐: https://libreremoteplay.vercel.app/
-
Discord Community 👥: https://discord.gg/v7qd7nU3fJ
-
Series of WebRTC Articles 👨💻: https://dev.to/piterweb/series/30718
-
Codeberg Mirror 🗃️: https://codeberg.org/PiterWeb/LibreRemotePlay
Use cases ✨
- Share your local co-op games online with friends (as Steam Remote Play Together)
- Stream your games from your PC to other devices (as Steam Remote Play Anywhere)
Download 📦
Resources 📚
- Docs 📘
- Linux Docs 📘
- Wiki (Guides, FAQ, ...)
- Discord Community
Videos 📹
(Note that videos may show older/beta versions of the APP and could have bugs that are already fixed in the latest version)
EmulatorJS was one of the early starting points and helped shape the approach, but the project evolved as I experimented with different ways of handling emulation and input.
Nostalgist.js became important while exploring the broader console side of Virtual Couch. LibreRemotePlay gave me the idea to make it possible
For the current NES Playtest Edition, I'm using JSNES 2.1.0.
Since this is a lot ill break it down into various parts like a series.
The simplest explanation I have is:
Virtual Couch lets you play local multiplayer games with someone who isn't in the same room.
The host opens their own game locally.
They send their friend an invite.
Their friend opens the link, connects a controller and takes Player 2.
The game still runs on the host's machine. The guest receives the game stream and their controller inputs are sent back to the host.
Host brings the game. Guest brings the controller. Virtual Couch handles the couch around it.
The interesting technical problem
What interested me wasn't really building another emulator website.
The question was:
Can I make a browser somewhere else behave like another controller sitting beside the host?
AND most importantly make it as simple and easy as hell for both the host and the guest.
Can I say this was probably not one of my brightest ideas? 😂 It turned out to be considerably more difficult than I expected and way outside my existing skill set. SO with good old trusty Google, Reddit and of cause Stack Overflow and good old wikipedia and a lot of other research material including repos.
The current system uses a host-authoritative architecture.
There is one game instance running on the host. Audio and video are streamed to the guest over WebRTC, while the guest's controller state is sent back to the host through a WebRTC data channel.
That means Player 2 doesn't need the game file or another emulator instance.
They need a browser, an invite and a **controller. Keyboard **works too.
And yes, getting all of that working involved breaking quite a lot of code.
I did warn you in my introduction. 😂
Then I made myself remove things. This was probably the difficult part for me. You see I like building systems and this means I have a terrible habit of seeing something work and immediately thinking:
“Okay cool... now what if I add this?”
So for the public playtest I deliberately started removing things.
The larger Virtual Couch project has more going on, but the public build became:
- NES.
- Two players.
- One Couch.
No accounts. No friends system. No SNES. No Genesis. No Arcade. No paid features.
Because none of those things answer the question I actually care about. Well, in the next part I'll introduce the experiment, go deeper into how the architecture actually works, show a bit of the build/code and some of the other fun stuff I've got planned.
And then finally...
I'll let all of you test the damn thing. 😂




Top comments (0)