Difference between revisions of "Netplay"

From EmuVR Wiki
Jump to: navigation, search
Line 1: Line 1:
 
__NOINDEX__
 
__NOINDEX__
  
'''This page is still under construction. It's constantly being edited and reorganized to be more clear, accurate and easier to read during this alpha testing. These are our first drafts.'''
+
'''This page is still under construction. It's constantly being edited and reorganized to be more clear, accurate and easier to read during initial tests.'''
  
 
On this page you'll learn everything about Netplay in EmuVR: what ''can'' you do, what you ''need'' to do, what works, what does not work, and how to troubleshoot any issues.
 
On this page you'll learn everything about Netplay in EmuVR: what ''can'' you do, what you ''need'' to do, what works, what does not work, and how to troubleshoot any issues.
Line 275: Line 275:
 
First and foremost, '''make sure your issue is actually related to netplay.'''
 
First and foremost, '''make sure your issue is actually related to netplay.'''
  
To confirm this, disable netplay mode (by clicking '''Stop Hosting''' or '''Disconnect''') and try your game again. If the issue persists, it's not netplay related, then please read the [[Troubleshooting|General Troubleshooting]] page, but still '''keep it in #alpha''' when asking for help, '''do not use #troubleshoot''' if you're in this alpha.
+
To confirm this, disable netplay mode (by clicking '''Stop Hosting''' or '''Disconnect''') and try your game again. If the issue persists, it's not netplay related, then please read the [[Troubleshooting|General Troubleshooting]] page.
  
 
'''Important:''' If you have any issues, pay attention to the '''Log Panel''' in the [[#Netplay Menu|Netplay Menu]] to see helpful messages and possible solutions to your problems.
 
'''Important:''' If you have any issues, pay attention to the '''Log Panel''' in the [[#Netplay Menu|Netplay Menu]] to see helpful messages and possible solutions to your problems.
Line 312: Line 312:
  
 
Try using lower resolution / quality videos, playing less simultaneous videos, and using ".str" files for [[Playing_Videos_and_Music#Streaming|external streaming]] instead, since they won't use the host's own upload bandwidth.
 
Try using lower resolution / quality videos, playing less simultaneous videos, and using ".str" files for [[Playing_Videos_and_Music#Streaming|external streaming]] instead, since they won't use the host's own upload bandwidth.
 
 
= How you can help =
 
# Please '''read this wiki''' with attention before troubleshooting in '''#alpha'''. (Do '''not''' use '''#troubleshooting''' if you're in this alpha.)
 
# Check the new posts and pinned messages on '''#alpha-announcements''' for some quick or advanced tests we might need your help with!
 
# Have fun!
 

Revision as of 21:08, 12 December 2020


This page is still under construction. It's constantly being edited and reorganized to be more clear, accurate and easier to read during initial tests.

On this page you'll learn everything about Netplay in EmuVR: what can you do, what you need to do, what works, what does not work, and how to troubleshoot any issues.

Quick Steps

After reading this page and playing a couple of times, this will be burned into your mind:

  1. Not all consoles and games support netplay
  2. You need to have the same exact ROM as your friend
  3. Hold Menu for half a second to show the Netplay Menu, then click Host
  4. Click to Copy your code, then send it to your friend
  5. Your friend clicks Paste, then Connect
  6. Play video games together!

But this TL;DR is the equivalent of "draw two circles, and now draw the rest of the damn owl". Keep reading this page to learn what you actually need to know to play!

The Basics

Here's what you can do in EmuVR's netplay:

  • You can invite friends to your own customized room, where you'll see each other and play (or watch) games and videos together.
  • Everyone will see your room as you do, with all custom textures, posters, walls, bed, and even game labels.
  • Anyone in the room can spawn objects or games, move them around, insert games into consoles, change cables; everything you already do in single player mode.
  • All players will see the host's inventory in their own menu when visiting.
  • Full drop in, drop out multiplayer:
    • You can start or stop hosting at will, without the need to restart EmuVR, to reload the room, or to even restart any game you're already playing.
    • Your friends can join you mid-game, and all your running games will be synced to them (if they have the same games).
  • Even while friends are visiting you, you can still save and load your rooms as a host, change the season, time of day.
  • You and your friends can play together in desktop and VR mode.

* There is no integrated voice chat currently. You'll need to use a third party solution like Discord, Oculus Parties Voice Chat or Steam Voice Chat to communicate.

Playing Games

1. Not every game, console or core supports netplay.
2. Everyone must have the same game to be able to play it.

Basically, anyone in the room can "grab the controller" and control any game as player 1 or player 2 or however many players that game supports. For example, Arcade games with four players such as Teenage Mutant Ninja Turtles, or multitap five player games like Super Bomberman 5. Anyone can "pass the controller" and swap who's controlling who on the fly.

Some example scenarios:

  • Play a 2-player game with your friend, versus or co-op.
  • Play a single player game while your friends watch. You can pass the controller on the fly and anyone can continue the game while you watch.
  • Play a fighting game and whoever loses will pass the controller to the third player who was just watching.
  • Each player plays a single player on each TV side by side. Different games, or how about a speedrun race of the same game?
  • Multiple pairs of players play different multiplayer games each, at same time, on different TVs in the same room. Anyone can switch controllers, change pairs, and control any other game at any time.


The limit is your hardware power and internet speed and quality. The one player with higher internet latency or worse hardware might bring everyone else's experiences down.

Again, not every game, console or core supports netplay, and everyone must have the same exact game to play or even watch it.

Requirements

Netplay has some specific requirements to work:

  1. Everyone needs the same EmuVR version.
  2. Everyone needs the same Retroarch version (Already taken care of for you)
  3. Everyone needs the same exact Cores, same versions. (Already taken care of for you)
  4. Everyone needs the same Retroarch settings. (Already taken care of for you, to some extent)
  5. Everyone needs the same exact ROM files. (We don't provide ROMs, don't ask and don't share)
  6. The host's computer needs to be directly reachable from the internet, through port forwarding or UPnP.

You don't need to have all the same games. If you're missing some specific game, others that do have it will still be able to play it, and only you will see a blank TV for that game.

Matching Games

To be able to play or even watch a game, you and your friend will need to have the same exact ROM file for that game.

(Videos and music are the exception, as only the host needs to have them.)

File names or paths do not matter. What only matters to match games are the actual file contents, which are detected when scanning them (from calculating their CRC hashes).

Again, to be clear: it doesn't matter if they're zipped or not, if they have totally different file names or if they are in differently named folders or subfolders.

Inventory

Joining a host is analogous to visiting a friend's house: you'll see their room with all their games, not yours.

And that's what you'll see in your own inventory while visiting a host: their own games, with their own labels, the same they see it while playing offline by themselves.

If you don't have some of the host's games, they'll still show up in your inventory menu, they'll still exist in the room as carts / CDs with (the host's) labels, and are as interactable as usual. They just won't play on TVs for you, but the host, or any other visiting friend that does have that matching game, will be able to see and play it on that same TV.

If anyone currently in the room doesn't have a game, this specific cartridge / CD will display a little "broken connection" icon in its label for everyone:

  • If you're the one without the matching game, you'll see a orange icon. You can interact with the physical media, but it won't play on TVs.
  • If you do have the matching game and it's someone else who does not, you'll see a green icon, even if you're the host. This will let you know that there's someone in the room who won't be able to play that game, but you and others with the green icon can play it.
  • If there's no icon at all on the game, it means *everyone* in the room has it.


TL;DR: See Orange WiFi icon on a game? You don't have it on your machine and can't play or even watch it.
See Green WiFi icon on a game? Someone else in the room doesn't have it but you do. Only Green-icon friends can play or watch this game with you.
No wifi icon at all on a game's label (look closely)? Everyone in the room can play and watch this game.

Netplay Menu

To show the Netplay Menu, you can navigate to it from the Settings Menu, or simply use the Netplay Menu Shortcut: hold Menu for half a second.

Point to anything there and you'll see a tooltip explaining what it does and how to use it. Everything in this section can also be read from those ingame tooltips.

There you'll be able to set your nickname, your player color, host your room, join another room, check other player's status and, if you're the host, kick them out.

If you don't write in any name, you'll be named "Player 1", "Player 2", etc.

There's an option to show other player names above their heads.

If you don't pick any color (or if you click Reset Color):

  • As a host, you'll be the default blue color.
  • As a client, you'll be assigned a random color each time you join a room.

Click Host to start accepting friends. Click Copy to grab your Address Code, then send them to your friends.

Your Address Code is generated from your external IP. If your IP hasn't changed, you'll always see the same code. Actual IP addresses can be used to connect as well. (If you're connecting through LAN, you'll need to use your LAN IP address.)

To join a host, click Paste or write the code or IP you've received, write the password if needed, then click Connect. Attention: by clicking Connect, you'll reload your latest saved (or default) room state, even if your connection attempt fails.

The Players List to the right will show all players in the room, their names, color, ping, and a button to kick them if you're the host.

Notice you can still edit the password field in real time even after you've started hosting, no need to restart the room or stop hosting to change it. This is useful if you want to kick someone and not allow them to simply join back, or if you want to stop allowing more clients to join your room.

Pay attention the *Log Panel* to the right to see helpful messages and solutions for issues you might be having related to Netplay.

* Currently there's no ingame keyboard, so you'll need to use your real keyboard to write in them for now, or the virtual keyboards available in Oculus Dash, SteamVR or Virtual Desktop.

TL;DR Quick Steps

  1. Hold Netplay Menu Shortcut
  2. Click Host
  3. Click Copy to grab your room Code
  4. Send the Code to your friends
  5. As a client, Paste the code, then click Connect

If you're having trouble and no one can connect to you, check the Port Forwarding section.

Controlling Games

Hosts and clients can Focus and Unfocus input into games as usual.

The first person to focus into a game will get the Player 1 controller, the next one will be Player 2, and so on. When you unfocus the game, you'll release that player slot, and the next person to focus input on that TV will use the first available controller.

Examples:

  • Two players focused to a game, P1 unfocus it, freeing P1 slot
  • A third person could focus into it and become the new P1, while P2 continues to be P2, and the old P1 is now a spectator
  • Alternatively, P2 can quickly unfocus and focus again on the game, becoming P1
  • Following the latter alternative above, if the previous P1 tries to focus input back again, the first available slot for them is now the P2 controller, so both players have effectively swapped controllers

When focusing or unfocusing into a game, the screen will display a message for a second showing the nickname of who is controlling that game, and with which controller. E.g. "John Wick is now controlling player 2"

Important: Just by joining a room, you're always connected through Retroarch's netplay for all games currently running, even if no one is controlling them.

Port Forwarding

If you're hosting, you'll need to open some specific ports or your friends won't be able to connect to you.

For most modern routers, you won't need to do anything, as the ports will be automatically opened for you through UPnP / NAT Punch-through. You might still need to enable UPnP on your router, so please refer to your router's manual.

If that still doesn't work in your case, you'll need to manually forward the following ports:

  • Port 4700 UDP (For EmuVR)
  • Port 4700 to 4730 TCP (For multiple Retroarch instances)

The above means ports 4700, 4701, 4702 ... 4729, 4730, TCP. (And, again, Port 4700 UDP)

That's one port for each console you're planning to play simultaneously.

Notice that port 4700 needs to be forwarded for both UDP and TCP. (TCP 4700 is reserved for syncing custom textures and cores)

If you never plan to play more than 10 games simultaneously, you can open up to port 4710. If you have a super machine and plan to play 99 games simultaneously with friends that have super machines too, you should open up to port 4799.

To make it clear, each time you start a console, it will take up one slot, and after shutting it down, it will free that slot. If you play 50 games in a section but only one at a time, you'll use only one port, 4701. 50 games but only two at a time? You're using ports 4701 and 4702.

Since each router brand and model has a very different kind of interface, it's impossible to write a universal guide. Unfortunately this might not be easy for the inexperienced user. Here are some guides on port forwarding for several interfaces: [1], [2], [3], [4], [5]. (Avoid downloading any software claiming to help you with it)

If your ISP somehow doesn't allow you to forward ports on your router or to have direct internet access to your computer, you might not be able to host a room in EmuVR unfortunately, but you can still connect to other players.

You'll need to allow EmuVR.exe and Retroarch.exe on your Firewall rules as well. Here's a guide for adding Firewall exceptions on Windows, and here's another one. If you're using a third party antivirus, it might have its own firewall settings.

Supported Systems and Games

Not every game or console supports netplay.

EmuVR relies on Retroarch's own netplay for the games. Not every core supports netplay.

The rule of thumb is: If it's newer than PS1 or N64, or a 3D game, it very likely does not support netplay.
(Refer to Retroarch's own Netplay FAQ)

Link-cable or internet connected games such as GB, GBC, GBA, PSP, NDS aren't possible either.
However you can still play them like any other single player game while others watch, and pass the controller to them.

While PS1 is not supposed to work according to Retroarch's docs, it does work well on our tests with Beetle PSX.

N64 might work depending on the game, on your hardware and your internet, but it's also prone to desync and even disconnections in some cases. More than 2 players can be even more unstable, depending on the aforementioned factors. Use the ParaLLEl N64 core for netplay, and not Mupen64Plus.

Computer cores, like DOS, Amiga, Commodore, usually do not support netplay.

Arcade games are well supported with cores FB-Neo and FB Alpha, but not with MAME.

Light Gun games are supported, including two-player games, but several cores that support light guns do not support netplay, like MAME and Flycast. Some few light gun games might be prone to desync.

Currently, the NES Zapper does not work with netplay. Usual non-light-gun NES games are pretty well supported.

We haven't tested every single core with netplay yet, so you can help us learn what works best, what desyncs a lot, and what uses too much CPU and RAM in netplay mode.

Videos and Music

You can watch your movies and cartoons with friends! This is experimental, and it will stream your own videos to visitors.

Not every format is supported, and it might take a couple of seconds (or not) to sync videos when joining or seeking through them. HEVC and files larger than 2GB are not supported currently.

Clients don't need to have the same video files on their computer for this.

Network streaming performance will depend on the host's video quality/bitrate, internet upload speed, and player count. If you have too many players in your room, starting a video might use up all of your available upload speed, overwhelming the whole network connection for EmuVR.

".str" files for external streaming are also supported, if the URL is reachable to everyone. This might be the preferred method if you're streaming to too many players in the room and your upload speed is not high enough, since everyone will be streaming the video from an external server instead of your machine.

* This is direct peer-to-peer streaming, no video files will be downloaded from hosts to clients.

Core Syncing

Retroarch's netplay requires the same exact core version to work. EmuVR deals with it for you automatically. This section is more about what you don't need to worry about.

When you're visiting a host and try to start a game, the host will automatically send the needed core to clients, if they don't have the exact same core and version. They're cached to prevent being sent every time you join. They will not replace your own installed cores.

Without this, all players would have to organize and to be sure they have the same exact cores before joining a host. And since many cores are updated weekly or even daily, you'd have to redo all this and replace your own cores each time they're joining a new host.

Core syncing allows players to connect with anyone with just a code, no need to plan and exchange files before joining.

Netplay also requires some specific Retroarch settings and core options to be exactly same same. EmuVR will also sync this automatically for you, and when joining a host you'll use their settings.

That said, some advanced Retroarch overrides or settings cannot be synced and might cause issues. To prevent possible problems with netplay and desyncing, it's advised to have a clean Retroarch state. If in doubt, deleting retroarch.cfg and \Retroarch\config\ will usually fix this (make backups before deleting anything). Custom controller bindings however are safe.

Changing any Retroarch settings while EmuVR is running will not be synced to other players and can cause desyncs.

* Cores downloaded before 10/18/2020 do not support automatic syncing; you'll need to update these outdated cores.

Game Saves

When hosting, all games will use your local game saves. If a client has the same game, this will not overwrite their own saves on their machines.

As a host, any game save will be committed to your files, even if it's a client playing the game, so be careful. Any visiting friend could start a game and overwrite your local saves, so make backups if needed.

Performance

While enabling netplay mode has a negligible impact on EmuVR's performance, Retroarch's netplay will use more resources depending on the core and game, even if you're just hosting and no one is connected to you yet.

Most 2D and older systems won't have any noticeable increase on CPU and RAM usage.

Some other cores however will have a dramatic impact as soon as you enable netplay mode.

For example, Beetle PSX can increase RAM usage from 800MB to 3GB and double CPU usage instantly when enabling netplay.

In the same way, Mupen64Plus can increase RAM usage from 1GB to 3GB and CPU usage can increase 5 times.

These numbers depend on the game and core.

If you don't have a lot of RAM, avoid trying to play too many PS1 or N64 games at the same time with netplay.

Some cores do not support netplay at all but will still use a huge amount of RAM if you try to run them. MAME, Dolphin and Play! can eat 8GB of your RAM instantly. Since they don't actually do anything in netplay besides eating your resources, we're manually disabling these cores if you enable netplay, as any remote player could simply start one of these games and crash your own machine if you don't have enough RAM. These systems will simply turn off instantly when try to turn then on during a netplay session.

Notice that every running game will be using resources on each player's machine, even if you're not controlling it. If someone behind you starts a N64 game, your machine will load up that extra CPU and RAM even if you haven't noticed it.

Again, most 2D games are fine, and we've tested around 15 simultaneous and synced games in netplay mode with several players in the room, including a couple of PS1 or N64 games here and there.

Desync

In some rare instances, you might experience a game desync.

This means that, while the game is still running on both machines, and you're still receiving and sending button presses, the game state has diverged between you and your friend, and you're not seeing the same events happening in the game, unknowingly.

Think of it as if a tiny but decisive event somehow had different outcomes for either of you, and this forks spacetime into two different parallel universes that will keep going on each machine.
You will walk (press) forward in both universes, but while your character is walking along a sidewalk on your own version, in the alternate universe others might see you crossing a dangerous street instead, or maybe walking into a wall, but technically you are walking forward on both universes.

This might be rare, but a little bit more prone to happen with some N64 or light gun games than others.

Example:

  • You're playing a Mustached Plumber Kart game with a friend. You're head to head.
  • Someone shoots a red shell in your direction.
  • For some reason, maybe bugs cosmic magic, you see the shell hit your friend, but on their machine they actually see the shell hitting you!
  • After that paradoxical outcome, you win the race, but to your friend, they're the one who won the race.
  • Following this, you might see them running into walls or doing random nonsense things, as if they're playing while blindfolded. And yet they seem happy. The reason is, on their machine, they're actually at another place in the track, maybe even on a different track, doing great, while you're the one doing weird things.
  • In the end, each player will think they've won, but everyone loses.

There's no warning or any way to notice you've desynced. If you want to help us to learn which systems or games are more likely to trigger this issue, the only way to know is to keep communicating with your friend and asking "What are you seeing on the screen?", "Are we doing this thing, in this place, in this level?", "Have I just won?", "Have I just died?", "Why are you smiling if I just killed you?", "Wait, you're saying you just beat me, what?"

If you're winning but your friend sounds like they've just won while you see them running randomly into walls, ask why.

Troubleshooting

First and foremost, make sure your issue is actually related to netplay.

To confirm this, disable netplay mode (by clicking Stop Hosting or Disconnect) and try your game again. If the issue persists, it's not netplay related, then please read the General Troubleshooting page.

Important: If you have any issues, pay attention to the Log Panel in the Netplay Menu to see helpful messages and possible solutions to your problems.


No one can join my room / I can't connect to a host

Make sure the host has forwarded all the needed ports correctly and set their firewall rules as explained here.


When starting any game as a client, it takes several seconds to load, often freezing EmuVR

This means the Host hasn't forwarded their TCP ports correctly, or hasn't allowed retroarch.exe on their Firewall rules. It's not your fault. Let the host know.


Some games won't load, and the console just turns off instantly

MAME, Dolphin and Play! do not support netplay at all but still can use more than 8GB of your RAM, so they're disabled while in netplay, as explained here.

If you're not using any of these cores, they're actually taking 3 seconds to turn off, and you made sure it still happens even with netplay disabled, this is not a netplay issue.


The console stays powered on, but there's nothing on the TV

This means you don't have the same game as the host, look for an orange icon on the cartridge / CD to confirm.

It can also mean you don't have your BIOS, or that for any reason your game is not working on your machine but is loading for other players. Make sure to test that game in offline mode as well.

If the game does load but for any reason Retroarch crashes or shut down only on your machine, you'll have a blank image on your TV, but the console will stay on. You can try turning the console on again locally, and it should load and sync to the host seamlessly. If this never brings the game back at all, your game is simply not loading, for the reasons mentioned above.


Some videos load on the Host, but not on Clients

Your video file might have been encoded using unsupported formats for streaming, such as HEVC, or it might be larger than 2GB.

If you really want that video and can't find another source, try reencoding it using more common formats, such as h.264 mp4.


When playing videos, players and objects movement get choppy

This usually means the host is maxing his upload speed by serving the video and hogging all netplay communication. Notice that the needed upload bandwidth will increase with each client in the room and each video currently being watched.

Try using lower resolution / quality videos, playing less simultaneous videos, and using ".str" files for external streaming instead, since they won't use the host's own upload bandwidth.