Jump to content
NHL'94 Forums

HOW TO: Netplay over RetroArch


chaos

Recommended Posts

Netplay via RetroArch

Netplay with RetroArch is very simple. Since RetroArch is a frontend for multiple emulator cores, setting up netplay for any core is very simple (as long as it supports it!), and is the same procedure.

For Genesis, we are using the Genesis Plus GX core for netplay.

For SNES, we are using the Snes9x core for netplay.

For installing RetroArch , please check out this page on nhl94online.com - Getting Started

The advantages to using RetroArch for netplay over Gens or ZSNES are numerous. Though ZSNES 1.42 has great netplay, we still require Hamachi for connections, since ZBattle does not exist anymore. Gens uses Kaillera for netplay, we still need Hamachi, and suffers from numerous lag, stutter, and desyncs, depending on the connection.

With RetroArch, we have 3 options, listed here with their pros and cons:

1. Direct Connect - With this type of connection, the 2 players connect directly to each other. Port forwarding is required in most cases, though if uPNP is enabled on your router, this may not be needed. Port that needs to be forwarded on your router is TCP 55435.

Pros - Best possible connection. With direct connect, you don't have to worry about any "middle-man" causing issues with the connection. 

Cons - Hard to setup. Some cases, setting a Static IP for your PC and port forwarding on your router is required. Might not be possible for some setups (university, work, apartment, hotel, etc). You can look up how to port forward and set up Static IP for your router model online.  

2. Direct Connect w/ Hamachi - With this type of connection, Hamachi VPN is used as the "middle-man". This removes the need to port forward (in most cases). You need to install Hamachi and have it running before starting RetroArch. You also need to make sure you and your opponent are in the same "virtual network". 

Pros - Good connection in most cases.  

Cons - Extra software needed. Using a "middle-man", you are at the mercy of the connection quality. There are times in the past where Hamachi caused problems for some, and direct connect was found to be the better solution. Since the signal is routed to a Hamachi VPN server before going to each player, there may be more latency in the connection (higher ping) than direct connect.

3. Relay Server - With this type of connection, both players connect to a "middle-man" relay server, hosted by RetroArch. No extra software needed, all you need to do is turn on the relay server option in Settings->Network.

Pros - Good connection. Easy to setup. No port forwarding or Static IPs needed. Just connect and play.

Cons - Since there is a "middle-man" server, all connections are routed through there. There are 2 server locations currently, one in NY, one in Spain (the NY one is the default). Connection is a little tricky, since the person connecting to the host (the client), has to wait until the host connects to the server (connected to "NICK" message). Sometimes, it is a little finicky and I've noticed I needed to close RetroArch and restart it to get the message. Most of the time it works though. Also, if there is a disconnection, the host has to wait until their name disappears from the Netplay List (~45 sec.) before trying to host again.

 

In a perfect world, everyone would use direct connect, but there are some cases where it's not feasible.

 

Netplay - How it Works

RetroArch uses rollback netplay (some of you might not like this). This is very big in the fighting game community. The goal of rollback netplay is too keep the experience "lag-free" as possible. This makes the game play very smooth. If there is a lag spike, the game will actually "rewind", to the point where if someone scored during a MAJOR lag spike, it erases the goal (hehe). It's less noticable than you would think, except in major cases. But, it's very hard to desync, and if you do desync, you can reconnect, and continue play where you left off, or the host can even load a save state while you are connected (ZSNES did this as well). Thus, the advantage of recovering from a desync and the overall smoother play should make everyone happy.

Beforehand, you should ask your opponent if you would like to use the relay server or direct connect. Direct connect may work without Hamachi/port forwarding, but it is not guaranteed. Currently, I recommend using the relay server. If you downloaded the package from nhl94online.com, the relay server option is already enabled. Relay server can be set to off in Settings->Network

Make sure you also have the SAME EXACT ROM!!! If not, there will be a disconnect and an error along the lines of "Cannot retrieve header".

 

1. The player acting as the host (home team on Genesis, either team on SNES) starts the game - 

Load the ROM, either using the "Load Core...", then "Load Content..." window or the "Load Recent" menu (if you've played the game before). Use F1 to enter the Quick Menu. Hit the backspace key (or button assigned to B on your controller) to back out to the Main Menu. Select Netplay, Host, Start Netplay Host. (You can also use the "N" key on your keyboard to toggle netplay hosting)

Netplay Window.png

 

When the game starts up, you should see a few messages on the bottom of the screen. Look for one that says "Connected to NICK". NICK is name of the relay server (if you are using direct connect, you will not see this message). Almost immediately after, you should see "Joined as Player 1". This is a good sign. You can now notify your opponent that they are able to connect to you. Again, you do not see this using direct connect; instead, you will see a message saying "waiting for client...". At this point, you can notify your opponent.

Nick.PNG

If they try to connect before you see these messages, it's very possible it will not connect.

At this point, just let the game sit there until your opponent connects. I usually wait at the in-game main menu.

 

2. The player acting as the client (away team on Genesis, the person not hosting on SNES) connects to the host - The player who will be connecting to the host will now go to Netplay in the Main Menu and select "Refresh Room List". You will see a list populate like below. Look for the name of the person you are playing, and select them. You do not need to have the ROM already open (it's optional). When you select their name, the game (as long as it is on your "Load Recent" list, i.e. you've loaded it once before) will automatically start up. When you connect, you should see a message, and it will say "You have joined as player 2".

netplay list.PNG 

 

3. Save the state at the end of the game - Play the game, at the end of the game, either on the 3-stars screen, or the game end menu, make a save state (press F5). This will be used to upload to the nhl94online.com site. Check this post for more information - 

The "Connect to netplay host" option in the Netplay menu is not used. This asks you to put an IP address in. You do not need it, as you can use the Room List instead.

 

Troubleshooting

Cannot connect, keeps saying "Connected as Player 1" for the client - If there is an issue and you did not connect, it will either give you an error, or it will just say " Connected as Player 1", and start loading the beginning of the game, which means you did not connect to the host. At this point, both players will need to go back into the Netplay menu, the host will "Stop netplay host", and the client will "Disconnect from netplay host". If using the relay server, the host has to wait about 45 sec or so before trying again (so the game is removed from the netplay host list). You can check by selecting "Refresh Room List" and checking until the host's name disappears (both can see this). (See "Game Desync") I suggest the host waiting to tell the opponent to connect once he reaches the Setup Game Screen. If using Direct Connect, you can re-host almost immediately.

NOTE: Both players have to be using the same RetroArch version, the same core version, and the same exact ROM in order to play together. If, for some reason, you are using anything other than the package provided on nhl94online.com for netplay, it will not work.

Game Stutters -  I noticed this occurs right when first connecting. It takes a few frames for the 2 games to sync up, so you may see some graphic glitches and menu stuttering. It goes away once you start actually playing.

Game Desync -  If you desync, you will see a message "Netplay Disconnected". This happens mostly when one of the players have the emulator paused for a long period of time (I'd say 10 sec or so), or if the internet drops out. If you disconnect, the host should keep the game running, pause (hit Start to go to the in-game menu), make a save state just in case, pull up the Quick Menu (F1 button), back out to the Main Menu, and select Netplay. Then, select "Stop netplay host". Then select "Refresh room list", every few seconds or so, until you see your name disappears from the list (the netplay server dumps the game from the server, like above). If using Direct Connect, you can re-host almost immediately. After this, you can select "Start netplay host", wait till you see the "Connected to NICK", "Joined as Player 1", "waiting for client..." messages, and notify your opponent that they can reconnect now. 

The client, in the meantime, should back out to the Main Menu, go to Netplay, and select "Disconnect from netplay host", wait for their opponent to notify them, and then reconnect to the host. Once connected, you will both be at the point where the host paused the game, and can continue.

If there is an issue, and the client cannot reconnect to the live game, or if the host closes the game at some point, reconnect as stated above, and once connected, the host can load the save state. Once the save state is loaded, you can continue play. No more need to game stitch or restart if there is a desync!!

 

Please let me know if there are any issues!

 

 

 

  • Thanks 1
Link to comment
Share on other sites

  • chaos pinned and featured this topic

Bumping this, had a few desyncs today due to disconnects from Hotel wifi. Please see above for the update. It's important that the host "Stop netplay host", then wait until their name disappears from the "Refresh room list" before trying to host again. Once the client reconnects after hosting again, the game will continue where the host left it (please pause the game before doing these steps!).

  • Thanks 1
Link to comment
Share on other sites

Ok, after about two weeks of trying (when our schedules linked up) a buddy and I finally got Netplay to work.  YAY!  

His graphics are passable, but mine are glitchy.  BOOO!

It seems to have small 'rewinds' and plays seem to play out different ways.  It's like I can see two or three options of something happening, but he just sees one.  Sometimes I'll score a goal (it will just last for a blip) but then it shows the puck getting stopped, and then it's suddenly somewhere else.  I'll hear a whistle when his goalie has it (like play has stopped), but then it shows that it hasn't stopped.  

I've hooked my laptop directly to the router with a data cable and have excellent internet speed (285Mbps per Speedtest.net).  

Any idea what will fix this?  I"m guessing I've just got some setting wrong.

The attached video shows how jumpy everything is.

Link to comment
Share on other sites

5 hours ago, D-Hizzle said:

Ok, after about two weeks of trying (when our schedules linked up) a buddy and I finally got Netplay to work.  YAY!  

His graphics are passable, but mine are glitchy.  BOOO!

It seems to have small 'rewinds' and plays seem to play out different ways.  It's like I can see two or three options of something happening, but he just sees one.  Sometimes I'll score a goal (it will just last for a blip) but then it shows the puck getting stopped, and then it's suddenly somewhere else.  I'll hear a whistle when his goalie has it (like play has stopped), but then it shows that it hasn't stopped.  

I've hooked my laptop directly to the router with a data cable and have excellent internet speed (285Mbps per Speedtest.net).  

Any idea what will fix this?  I"m guessing I've just got some setting wrong.

The attached video shows how jumpy everything is.

Please look at this thread - 

Check the estimated framerate for both players

 

Link to comment
Share on other sites

  • 3 months later...

Apologies if this is covered elsewhere in the forum but... does has anyone managed to get this working on Retroarch when it is being run through, for instance, a Genesis Mini or a SNES Mini?  I have modded my Genesis Mini (using Hakchi) and have installed Retroarch and it runs perfectly, although I have never tried any of the (potential) online functionality.  Presumably (he says, just guessing), I can plug in a wi-fi adapter and get it connected to my router but I am not sure if the netplay option can be used with the Genesis / SNES mini systems.  No matter if not, as I can use my PC (and follow the guide above) but I figure it is worth asking.  Thanks.

Link to comment
Share on other sites

  • 3 months later...
29 minutes ago, Coach Mike said:

I got network play to work yesterday using two computers in my same house as a test but I cannot seem to get it to work today.  I cannot seem to get the Connected to NICK message. Can anyone assist ?  Thanks!

Did you use the IP address of the computer on your network to connect to it directly?  If so, your IP address may have changed overnight.

Link to comment
Share on other sites

I am starting to think I really buggered something up trying to connect two computers via relay server at one home.  For the life of me I cannot get the "Connected to NICK" message using ANY computer now !  And my Logitech Dual Action game pads now reports as NOT CONFIGURED when it was before.  Unplug it, plug it in, same deal.  I think I broke my Retroarch :(

Link to comment
Share on other sites

14 hours ago, Coach Mike said:

I am starting to think I really buggered something up trying to connect two computers via relay server at one home.  For the life of me I cannot get the "Connected to NICK" message using ANY computer now !  And my Logitech Dual Action game pads now reports as NOT CONFIGURED when it was before.  Unplug it, plug it in, same deal.  I think I broke my Retroarch :(

Follow the getting started guide and follow the instructions to set up your controller. Make sure you do "Save Autoconfig" once done settings the buttons.

Make sure "Use Relay Server" is turned on in Settings-Network.

If you don't get the connected to nick message, maybe just try with a fresh install of RA.

http://nhl94online.com/html/getting-started.php

 

Link to comment
Share on other sites

I am starting to think the reinstall is the best route.  I think uninstalling in Windows is a little more comprehensive/simple as I *think* it takes out anything that could cause residual settings problems but I might be mistaken.  On the Mac side I suspect it's as easy as deleting all the folders in /Documents/RetroArch. 

Does the relay server have an automated "blacklist" feature I wonder ?  Having connected with the same IP twice previously perhaps that is the reason I cannot connect to the server ("Nick) ?  It might also be possible that my username is causing the issue.  I had started adding information in parentheses to be able to distinguish which machine/OS I was using when testing.  Can anyone confirm ? 

Also reading that the direct connect may make things simpler assuming all my players have UPnP on their routers.  I have read all the setup documentation at length, perhaps over-read and confused myself but I don't see a clear explanation of direct connection so that the guest knows who/where to connect.  I believe I recall that on the room list it will say "Relay" if that is what the player is using.  That said, does it mean that all rooms that DO NOT say "Relay" are direct connect ?  Or do you have to communicate your IP to your opponent and manually enter that for connection.

Sorry for all the questions that are likely answered in some fashion somewhere !

Link to comment
Share on other sites

Ok update time.  I did a reinstall on Mac and PC.  I still can't get the Connected to Nick on either Mac or PC when using Relay Server.  I do get Joined as Player 1 on both and can create a room using Direct Connect, which I can see from the other computer. As long as my group can Direct Connect I think it things will be fine, I just thought this might be useful to troubleshoot and/or be a resource for others.  

Interestingly, the reinstall on Mac did not restore the Logitech Dual Action, it reports as Not Configured.  I realize I can do that manually and save it, I just expected it to work automatically (like it did initially) after the reinstall.  Since I am likely playing on Windows I don't really care but as I mentioned, here for troubleshooting/debugging/resource purposes.

Link to comment
Share on other sites

So I got a person in another house to work with me via Zoom to troubleshoot. I got us both up and running and able to see one another via Direct Connect but when trying to join each other's games (not at the same time) we were unable.  The screen goes black, it hangs for a bit and says it cannot establish network connection or something to that effect.  I did see in the Netplay over RetroArch guide, that: "

Troubleshooting

Cannot connect, keeps saying "Connected as Player 1" for the client - If there is an issue and you did not connect, it will either give you an error, or it will just say " Connected as Player 1", and start loading the beginning of the game, which means you did not connect to the host. At this point, both players will need to go back into the Netplay menu, the host will "Stop netplay host", and the client will "Disconnect from netplay host". If using the relay server, the host has to wait about 45 sec or so before trying again (so the game is removed from the netplay host list). You can check by selecting "Refresh Room List" and checking until the host's name disappears (both can see this). (See "Game Desync") I suggest the host waiting to tell the opponent to connect once he reaches the Setup Game Screen. If using Direct Connect, you can re-host almost immediately."

To be fair I did not attempt to "re-host", that will be my next step.  In the meantime, are there other known issues as to why this might not be working ? ...tia

Link to comment
Share on other sites

Best bet is to go on the Discord (http://nhl94.com/joinus). Try to join a game with someone who already has it working, as a sanity test. Then they can help you figure out your hosting.

Link to comment
Share on other sites

47 minutes ago, Coach Mike said:

So I got a person in another house to work with me via Zoom to troubleshoot. I got us both up and running and able to see one another via Direct Connect but when trying to join each other's games (not at the same time) we were unable.  The screen goes black, it hangs for a bit and says it cannot establish network connection or something to that effect.  I did see in the Netplay over RetroArch guide, that: "

Troubleshooting

Cannot connect, keeps saying "Connected as Player 1" for the client - If there is an issue and you did not connect, it will either give you an error, or it will just say " Connected as Player 1", and start loading the beginning of the game, which means you did not connect to the host. At this point, both players will need to go back into the Netplay menu, the host will "Stop netplay host", and the client will "Disconnect from netplay host". If using the relay server, the host has to wait about 45 sec or so before trying again (so the game is removed from the netplay host list). You can check by selecting "Refresh Room List" and checking until the host's name disappears (both can see this). (See "Game Desync") I suggest the host waiting to tell the opponent to connect once he reaches the Setup Game Screen. If using Direct Connect, you can re-host almost immediately."

To be fair I did not attempt to "re-host", that will be my next step.  In the meantime, are there other known issues as to why this might not be working ? ...tia

Direct Connect wont work unless you forward your ports in your router, or your router is uPnP compatible (if it is uPnP compatible, when you start hosting, you will see a "port mapping successful" message when hosting with relay turned off).

It could be a problem with the relay server that you are not getting the "Connected to NICK" message. This is out of our control. We recommend using direct connect. For info on how to set that up, look at this thread (there's also a video link in there to watch):

 

Link to comment
Share on other sites

14 hours ago, Coach Mike said:

Gah! I get "compatible content found" then "failed to initialize netplay".  Both me and the person I was trying to play saw the port mapping successful message so it has got to be one little darn thing !


Both of you have to make sure the game is listed on your "Load Recent" list in RA (Main Menu-Load Recent). You get it on there by loading the game at least once before.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Who's Online   0 Members, 0 Anonymous, 19 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...