Ize Posted June 1, 2017 Share Posted June 1, 2017 While playing around with RetroArch 1.60 at work today, i threw this plugin together to quickly launch netplay sessions. It works great in lan but i haven't tested it via WAN... you'll probably need a good connection for it to work decently over wan for now. I haven't added the framesettings etc. yet, it's as simple as can be. If you want to test it, make sure that the host and client both use the same core in retroarch and EXACTLY the same rom, retroarch will say nope otherwise Here's a short video of me testing it locally with mk2(pool fatality, pit fatality, fatality!) f yeah : If there's any interest i'll update this with more features and saving of the nickname etc. LBP_SimpleRetroarchMultiplayer.dll 5 Quote Link to comment Share on other sites More sharing options...
The_Keeper86 Posted June 1, 2017 Share Posted June 1, 2017 Really sweet idea! I guess it'd be better if it could be made to be more automatic if that makes sense? Quote Link to comment Share on other sites More sharing options...
Ize Posted June 1, 2017 Author Share Posted June 1, 2017 On it ? 2 Quote Link to comment Share on other sites More sharing options...
TheMadMan007 Posted November 1, 2017 Share Posted November 1, 2017 Any update on this? This is one of the big issues for me since I want to play Retro games with my friend in Texas, and I have set him up with LaunchBox and the games and its nice and easy for him, but the Netplay just is a hassle. Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted November 1, 2017 Share Posted November 1, 2017 Netplay with Retroarch is something I believe @Jason Carr has planned for this next round of updates for the next official build. Of course I could be wrong and Jason could change is mind but I believe he mentioned that being next because it was the next most voted thing on the last poll. Quote Link to comment Share on other sites More sharing options...
TheMadMan007 Posted November 1, 2017 Share Posted November 1, 2017 Oh awesome! Thanks! Quote Link to comment Share on other sites More sharing options...
sagaopc Posted November 28, 2017 Share Posted November 28, 2017 how it works? where I put the dll? Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted February 2, 2018 Share Posted February 2, 2018 @Izegod I somehow missed this thread but just stumbled on your video here: This is exactly what I was looking to do to integrate Retroarch Netplay, awesome job! The only pain point I can foresee is that supposedly Retroarch requires the ROM files to be scanned in for it to work. Is that your observation as well? Also, would you be willing to share your source code with me to help me get it integrated faster? I would be looking to basically implement it exactly as you have done it, but with an interface that is more integrated into LaunchBox and Big Box. I'll certainly credit you for that code. Quote Link to comment Share on other sites More sharing options...
Ize Posted February 2, 2018 Author Share Posted February 2, 2018 @Jason Carr the roms checksum has to be same and it'll work... i've never scanned my roms with retroarch I'll just paste the HORRIBLE class here: using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using Unbroken.LaunchBox.Plugins; using Unbroken.LaunchBox.Plugins.Data; using System.Windows.Forms; using System.Diagnostics; using System.IO; using Microsoft.VisualBasic; //need this for the inputbox... obsolete with proper gui //I apologize for this horrible code but maybe you can still use something from it :P namespace LBP_SimpleRetroarchMultiplayer { public class Class1 : IGameMenuItemPlugin { public string Caption { get { return "RetroArch Multiplayer"; } } public System.Drawing.Image IconImage { get { return null; } } public bool ShowInBigBox { get { return true; } } public bool ShowInLaunchBox { get { return true; } } public bool SupportsMultipleGames { get { return false; } } public bool GetIsValidForGame(IGame selectedGame) { if (PluginHelper.DataManager.GetEmulatorById(selectedGame.EmulatorId).Title == "Retroarch") //emulator is retroarch? ok for netplay! return true; return false; } public bool GetIsValidForGames(IGame[] selectedGames) { return false; } public void OnSelected(IGame[] selectedGames) { return; } public void OnSelected(IGame selectedGame) { var emulator = PluginHelper.DataManager.GetEmulatorById(selectedGame.EmulatorId); var platform = PluginHelper.DataManager.GetPlatformByName(selectedGame.Platform); var emulatorPlatform = emulator.GetAllEmulatorPlatforms().ToList<IEmulatorPlatform>().Find(p => p.Platform == platform.Name); Process myArch = new Process(); myArch.StartInfo.FileName = Path.GetFullPath(emulator.ApplicationPath); //retroarch doesn't like shortened paths so i use the GetFullPath function myArch.StartInfo.Arguments = emulatorPlatform.CommandLine + " " + '"' + Path.GetFullPath(selectedGame.ApplicationPath) + '"'; myArch.StartInfo.WorkingDirectory = Path.GetDirectoryName(Path.GetFullPath(emulator.ApplicationPath)); //set working directory to retroarch.exe's dir var addCommand = ""; if (MessageBox.Show("Do you want to host?" + Environment.NewLine + "If you choose no, you will connect as the client.", "Netplay setup", MessageBoxButtons.YesNo) == DialogResult.Yes) { addCommand = addCommand + "-H "; //-H = Host addCommand = addCommand + "--nick " + Microsoft.VisualBasic.Interaction.InputBox("Please enter your nickname:","Multiplayer setup"); } else { addCommand = addCommand + "-C " + Microsoft.VisualBasic.Interaction.InputBox("Please enter the Server IP or Hostname:", "Multiplayer setup"); //-C = Connect to server as client addCommand = addCommand + " --nick " + Microsoft.VisualBasic.Interaction.InputBox("Please enter your nickname", "Multiplayer setup"); } myArch.StartInfo.Arguments = myArch.StartInfo.Arguments + " " + addCommand; //add our new command to the arguments myArch.Start(); //launch } } } Maybe you can still salvage something from it... it doesn't really do anything except start retroarch with parameters I didn't develope this any further cause there wasn't much interest 2 Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted February 2, 2018 Share Posted February 2, 2018 5 minutes ago, Izegod said: i've never scanned my roms with retroarch That's good to hear, I was foreseeing this being a big issue but if there is a way around it that is very good. 1 Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted February 2, 2018 Share Posted February 2, 2018 Thank you very much @Izegod! That should do well to get me started. Quote Link to comment Share on other sites More sharing options...
TheMadMan007 Posted February 2, 2018 Share Posted February 2, 2018 If this can get implimented and working well with Launchbox, this would be huge!! Its my single most wanted feature at this point. I have noticed it the past when Netplay was redone last year, that you did have to have the roms scanned in RetroArch for it to work, and they needed to be used with the same core and same files, but if you and the other player have the same stuff, it did work pretty well. I haven't tried in a long long time as I was waiting for this. I really hope you guys can figure it out! 1 Quote Link to comment Share on other sites More sharing options...
Ize Posted February 3, 2018 Author Share Posted February 3, 2018 You only need to have the roms scanned in retroarch if you use the integrated serverbrowser of retroarch afaik... so it can join a sesssion properly by checking if you have the correct rom. By starting it via commandline you directly tell it which rom to use... so no need to check it's own database It's just important that both players use the EXACT same core (you have to set this up before!) and the EXACT same rom... if there is a crc missmatch during the handshake retroarch won't sync the games or abort the connection. 2 Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted February 5, 2018 Share Posted February 5, 2018 Alright, so I have this integrated in the latest beta: @Izegod I forgot to put your name in the change log for this beta, but I have it in there for the next one. Thanks again for the plugin and the code. I'm having a bit of trouble testing it, so if anyone can jump on testing it and let me know how it goes, I'd appreciate it. 2 Quote Link to comment Share on other sites More sharing options...
Ize Posted February 6, 2018 Author Share Posted February 6, 2018 (edited) lol that was fast. i'll test it when im back from work later today EDIT: meh... just startet lb @ work cause i wanted to test it: Works great actually @Jason Carr Edited February 6, 2018 by Izegod 1 Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted February 6, 2018 Share Posted February 6, 2018 8 hours ago, Izegod said: lol that was fast. i'll test it when im back from work later today EDIT: meh... just startet lb @ work cause i wanted to test it: Works great actually @Jason Carr Woot! Good to hear. Now if only I could get it working myself... Quote Link to comment Share on other sites More sharing options...
TheMadMan007 Posted February 8, 2018 Share Posted February 8, 2018 (edited) On 2/5/2018 at 11:27 PM, Izegod said: lol that was fast. i'll test it when im back from work later today EDIT: meh... just startet lb @ work cause i wanted to test it: Works great actually @Jason Carr Looks like you are running two copies of Retroarch locally... correct? Or are you remoting in and running one instance locally and the other remotely? Because I can't get it to work from outside the network yet. I'm having some weird slowdown issues though running Netplay. Contra on NES for instance runs fine just loading up the game without netplay, but with netplay enabled, it runs a bit slower and has choppy audio. Edited February 8, 2018 by TheMadMan007 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.