#1  
Old 2nd November 2010, 06:54 AM
aqwertyz aqwertyz is offline
Alpha Tester
Project Supporter
Junior Member
 
Join Date: Apr 2009
Posts: 26
Default NetPlay Input Plugin

Hello everyone. I've been working on an N64 input plugin that supports netplay. This is meant to be a workaround until zilmar implements netplay directly in Project64.

Here's the link to download the plugin and instructions on how to use it: http://www.play64.com/netplay-plugin/

Last edited by aqwertyz; 25th February 2015 at 02:57 AM. Reason: Provided hosting for the plugin
Reply With Quote
  #2  
Old 2nd November 2010, 07:09 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 15,464
Default

Sweet I must try this out tomorrow.

One initial curiosity though. What about like, using the plugin on other emulators? What's it like to make the plugin a NetPlay plugin that interacts with any N64 emulator using the plugin spec of Project64?
Reply With Quote
  #3  
Old 3rd November 2010, 12:19 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 15,464
Default

Oh great thanks for the info, but it's pretty clear now why this was designed as a solution for people with Project64 1.7 and not between different emulators if desync can happen randomly. I understand basics of NetPlay science from reading info off the Kaillera site though, but yeah...how did you write this plugin even though NetPlay functions weren't designed in the Controller section of the common plugin spec?

Why is disabling memory pak emulation to help prevent desync? I imagine the reason wasn't if everyone isn't using the same exact controller pak file binary, because well...that can be arranged, so was there some technical reason?

Connect
-Host: "LOL"
-Port: 27999
"No such host is known."
awww

Heh anyway as you can see I gave this a test, although I haven't picked someone to play to test this with just yet.
So I have questions on,
Step 4? When it says send a save file for that game to the other players, does that happen automatically, or do I do it manually? Cause I noticed after step 3, I just go to step 5 then it works. Or I guess you just mean "Make sure the save file in $emudir\Save is the one you want your adversaries to use during the game." Yeah, desync can happen really easy if everyone isn't using the same save.
Well apparently I made it up to step 7 anyway. Okay so I leave it blank, and the others should know what my IP address is if they want to join. Very simple, thanks.

So yeah in 1 player test, setting the lag to 0 / as low as possible had no effect on the speed, and that I think is because with one player there is no transfer between other participants and the NetPlay server.

Oh yeah about the pause emulation when window is not active, I think Kaillera completely disabled pausing the game while a NetPlay game is in session iirc. Just a note I recall. Or maybe the pause from the host can be sent to the other players' emulators as well.
Reply With Quote
  #4  
Old 3rd November 2010, 12:40 AM
aqwertyz aqwertyz is offline
Alpha Tester
Project Supporter
Junior Member
 
Join Date: Apr 2009
Posts: 26
Default

I was able to write a netplay plugin as a controller plugin because controller plugins are what feed the input data (which buttons are being pressed) to the emulator. That is how netplay works. As long as everyone's emulator is receiving the same input data from one frame to the next, the same events occur in the game.

I mainly disable memory packs because I didn't want to take any chances with desync. Those features work by exposing raw data to the controller plugin. I really don't know any more details about it, so I turned it off to be safe. Maybe I will experiment more with it in the future.

If you want to test the netplay plugin alone, do this:

Make an entire copy of the Project64 folder so you have two Project64s. Open two Project64s. Start the same game in both emulators. In one emulator, leave the host blank and click start server. In the other emulator, use "127.0.0.1" for the host and click connect. 127.0.0.1 is the loopback interface, so it means you will connect to yourself. Now, in either emulator, click Start Game.

My plugin cannot send save files to other players because input plugins don't have access to that information. The user has to do it manually.

When you play alone or test the plugin on your computer with multiple emulators running, lag 0 will work fine because there is no network delay.
Reply With Quote
  #5  
Old 4th November 2010, 12:56 AM
Hero's Avatar
Hero Hero is offline
Project Supporter
Senior Member
 
Join Date: Feb 2010
Posts: 266
Default

Very, very cool. Well done, sir.
I've played SSB with a buddy of mine back home, but that's as far as my testing has gone. As you said, it works much better on 1.7 than 1.6, or any other emulator for that matter.
Reply With Quote
  #6  
Old 4th November 2010, 10:01 AM
zilmar zilmar is offline
Core Team
Alpha Tester
Project Supporter
Administrator
 
Join Date: Jun 2005
Posts: 665
Default

I know I have not gotten net play in to the core, something I wanted to do. 1.6 has fundemental issues that would cause the game to desync. A lot of the work is done to make 1.7 stable so that it would not desync.

At some stage I will get it in. I hope you enjoy the plugin your using.
Reply With Quote
  #7  
Old 4th November 2010, 09:29 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 15,464
Default

aqwertyz I'll get to the self-connect test method, just setting this up for someone else on here to test this out with. I just noticed that if you end emulation then restart it with the same plugins, Project64 crashes with the fault module name stated as your plugin. I wonder if that has something to do with that question in the other thread about the movement of the closeROM() function. Going to test this with a buddy then do what you said. Even when NetPlay is internally added to the emulator it's still really cool you made this--as well as useful for other emulators.

Mr. zilmar lol don't worry we will.
Reply With Quote
  #8  
Old 4th November 2010, 10:35 PM
aqwertyz aqwertyz is offline
Alpha Tester
Project Supporter
Junior Member
 
Join Date: Apr 2009
Posts: 26
Default

I tried what you described but I can't seem to cause Project64 to crash. Which input plugin did you use with the netplay plugin? Were you using the most recent version of Project64?
Reply With Quote
  #9  
Old 4th November 2010, 10:42 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 15,464
Default

Yeah I think so, Project64 build 50.
I was using N-Rage's DirectInput 2.00b (overhaul version by rabiddeity).

I tried it again, though, and it didn't happen. IIRC it was before the part when you plug in a controller for each player, but I haven't reproduced it since then.
Well I have Vista anyway.
Reply With Quote
  #10  
Old 8th November 2010, 04:29 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 15,464
Default

Hey I tested this out with someone, but we couldn't start the game.

When I hosted and had him enter the IP, it always gave the "connection attempt failed" timeout error, probably because my parents use a router in this network that I know nothing about and need to use a certain port number.

When my adversary hosted, I got the "connection actively refused" error message, even when he disabled the firewall. Tried the IPv4 address as well for the hell of it.

Any idea why the second problem happened?
Heh or help with the router in the first problem?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.