Hard Light Productions Forums

General FreeSpace => Multiplayer => Topic started by: shiva2552 on April 11, 2010, 07:17:56 am

Title: Question adout multiplayer
Post by: shiva2552 on April 11, 2010, 07:17:56 am
I am sorry, is it possible for 2 people to play FSMultiplayer from the same house?
I've tried it, but when the second player joins the game he gets kicked out with a message that says:

"There is already an identical player in-game" or something.

Is there a way out of this or not?

Please help me.  :)
Thanks.
Title: Re: Question adout multiplayer
Post by: headdie on April 11, 2010, 07:28:32 am
you playing online or LAN?
Title: Re: Question adout multiplayer
Post by: shiva2552 on April 11, 2010, 07:33:31 am
in the launcher i have selected:
"LAN/DIRECT connection"
Is that what you mean?
Title: Re: Question adout multiplayer
Post by: captain-custard on April 11, 2010, 07:39:25 am
are we talking about you playing against each other on lan , or both of you joining fs2net and playing online ...;

it looks like your trying to join fs2net but on the same IP addess; so fs2net will see you as one person and kick one of you
Title: Re: Question adout multiplayer
Post by: shiva2552 on April 11, 2010, 07:45:43 am
are we talking about you playing against each other on lan , or both of you joining fs2net and playing online ...;

it looks like your trying to join fs2net but on the same IP addess; so fs2net will see you as one person and kick one of you

You're right. But is there a way for us to play together?
Like one of us change something so that we don't look identical to FSNet?
Title: Re: Question adout multiplayer
Post by: headdie on April 11, 2010, 07:48:50 am
do you have a cabled or wireless network?
Title: Re: Question adout multiplayer
Post by: shiva2552 on April 11, 2010, 07:53:47 am
do you have a cabled or wireless network?

Cabled.
Title: Re: Question adout multiplayer
Post by: headdie on April 11, 2010, 07:57:05 am
make sure your computers are hooked up and your internet connection is off-line and see if you can connect
Title: Re: Question adout multiplayer
Post by: The E on April 11, 2010, 07:59:38 am
What.

shiva2552: Sorry, but no. If you're both sitting behind the same router, you will not be able to connect to fs2netd at the same time. You can play over LAN, but you won't be able to connect to fs2netd.
Title: Re: Question adout multiplayer
Post by: shiva2552 on April 11, 2010, 08:10:21 am
Is it possible for one of us to connect using a different IP (e.g the IP of an office of mine)?
Title: Re: Question adout multiplayer
Post by: The E on April 11, 2010, 08:13:26 am
The answer remains the same. If you're behind the same router, that is, share the same external IP, only one of you will be able to connect to fs2netd. If your office has a different connection, then it's possible.
Title: Re: Question adout multiplayer
Post by: shiva2552 on April 11, 2010, 08:20:03 am
I'm sorry but there is just one more thing...

In the FSO launcher, I notice that there is a "Force IP Adress" option.
So, can one computer use the router's IP and the other one "force" its IP to the IP of the Office?

If "Force IP Adress" doesen't work, is there any other way to do this?
Title: Re: Question adout multiplayer
Post by: headdie on April 11, 2010, 08:28:13 am
what The E is on about is that you have a router which connects you to the internet, now the simplified explanation goes along the lines of on your side of that router everything on the network has an IP address, but as the signals go through the router to the wider internet the signal is assigned the routers IP address, this is typically assigned by your internet provider and cannot be changed and it is this address which fs2netd sees
Title: Re: Question adout multiplayer
Post by: The E on April 11, 2010, 08:30:07 am
*sigh*

I see a lack of understanding here.

When your computer connects to the internet, what it actually does is to connect to your router, which then acts as a gateway to the larger internet.
Your PC's IP is not visible to the Internet (and by extension, the fs2netd server), your router's IP is. This is what's called an external IP.
You can use a site like http://www.whatsmyip.org/ to find out what your external IP is.
If two PCs are behind the same router, they will share an external IP, and thus look to the internet like one single machine.

The Launcher's "Force IP" will not work over the Internet, as it just forces your local IP to whatever you set there. Which is a bad idea, possibly won't work, and should only be used if you really, really know what you are doing.
Title: Re: Question adout multiplayer
Post by: shiva2552 on April 11, 2010, 08:30:56 am
Alright, thanks.
That will be all. ;)
Title: Re: Question adout multiplayer
Post by: FUBAR-BDHR on April 11, 2010, 04:19:46 pm
What you can try is using force port.  The default is 7808.  Set the second computer to 7809.  You will need to set firewall and router to handle 7809 for the second PC just as you did 7808 for the first. 
Title: Re: Question adout multiplayer
Post by: chief1983 on April 11, 2010, 11:04:06 pm
Did anyone make sure they both have different FS2NetD accounts configured?  Sounded more like that was the problem, unless FS2NetD blocks more than one connection from the same IP, in which case nothing can be done about that.
Title: Re: Question adout multiplayer
Post by: The E on April 11, 2010, 11:05:36 pm
FS2NetD is built on the assumption that there's only one player per IP, IIRC.
Title: Re: Question adout multiplayer
Post by: QuantumDelta on April 12, 2010, 05:31:10 am
Not just FS2NetD, PXO and FreeSpace2 itself make that assumption.
Title: Re: Question adout multiplayer
Post by: headdie on April 12, 2010, 07:16:00 am
I presume this is a symptom of the era FS2 was released when most ppl still only had 1 PC per house and if they had more than 1 chances were only 1 had an internet connection so writing additional code to handle more than 1 player down a given IP was unnecessary
Title: Re: Question adout multiplayer
Post by: chief1983 on April 12, 2010, 09:54:39 am
It's not a question of handling it.  It would almost have to be an active block rather than something just not handled.  There have been NATs for ages.  They're more than capable of figuring out what packets need to go where without any additional work on your behalf.  The server would actually have to be preventing connections from the same IP on purpose.
Title: Re: Question adout multiplayer
Post by: QuantumDelta on April 12, 2010, 04:33:43 pm
Some NATs do work with FS2, however if I were to suggest in an example of numbers, of allllllllllll the examples I have ever come across of this problem, or a solution for it, FUBAR is the ONLY person I have EVER met who has managed to have more than one machine on FS2NetD or PXO at the same time (*ingame, not lobby).

If FS2 doesn't actively block it, it's fairly possible that it is ignorant of NATs completely.
No one has ever looked at the network code AFAIK, it's still the original 1.2 network code, which, really is only a bit of polish on FS1's network code (*anyone who complains about lag in FS2 can cry me a river, and should go fly FS1 on a 33.6k modem to a 1mbit host on the opposite EXACT, side of the planet, then I might listen to their complaints :P not to say Fs2's network code couldn't still be improved, a lot, I however, have no idea how to go about doing that..).

It was never very tolerant of people on the same IP, that's all I know.
Title: Re: Question adout multiplayer
Post by: FUBAR-BDHR on April 12, 2010, 04:41:18 pm
I even log in to FS2netD and play against myself from the same machine at times.  That's right 2 windows, same machine, same IP, different port.  So it can't be blocking more then one per IP. 
Title: Re: Question adout multiplayer
Post by: chief1983 on April 12, 2010, 05:03:39 pm
It's one thing for it to just not work, not see games, time out, etc.  It's another thing altogether for it to actively say the same user is trying to connect.  That's not it detecting the same IP, that's got to be something else, which is why I threw out identically configured PXO/FS2NetD accounts on both machines.
Title: Re: Question adout multiplayer
Post by: QuantumDelta on April 12, 2010, 05:31:39 pm
Ironically, PXO (*haven't tried with FS2NetD) never really cared about multiple users on the same account, long as they had different IPs.
My account had a few people with access to it, for lulz and other such niceties..



Edit;
FS2NetD hits "Login failed" (and only "Login Failed" no reason why) if you're sharing an account with someone else online at the time.

Really sure that that specific error, "same user is trying to connect" is only seen when trying to join a game from the same IP address.
Title: Re: Question adout multiplayer
Post by: chief1983 on April 12, 2010, 05:50:19 pm
So FUBAR gets around that by some port trickery or what?  Sounds like what he's doing shouldn't work if that's the case.
Title: Re: Question adout multiplayer
Post by: FUBAR-BDHR on April 12, 2010, 06:25:39 pm
I've only ever seen the same user already in game message when trying to connect from the same machine and port.  This usually happens if you crash and the server hasn't realized that you dropped so your IP, port, and login are all the same.  I use the same login, same directory, heck sometimes the same exe from the same machine and don't get that message.  Yea it's slow as heck and the debug log is fun to try to read when you run 2 copies of debug but no such restriction seems to exist.
Title: Re: Question adout multiplayer
Post by: FUBAR-BDHR on April 12, 2010, 06:39:05 pm
OK I did some testing on this.  You can host and be a client from the same machine but you can't be a client twice.  So if both are tying to join the same server (including standalones) then they will get the message.  If one hosts the other should be able to join. 
Title: Re: Question adout multiplayer
Post by: chief1983 on April 12, 2010, 06:47:39 pm
So it looks like an issue in the FSO code and not the FS2NetD code then, right?
Title: Re: Question adout multiplayer
Post by: FUBAR-BDHR on April 12, 2010, 06:56:18 pm
Could be either.  Have to dig to see what causes that message.  Does the host send it or does FS2netD send it?  Without knowing that it's hard to tell.

OK this is code related.  Function find_player() in multiutil.cpp line 447.  It only does a compare IP to IP.  Probably could be updated to check IP + port as port is contained in that structure as well.
Title: Re: Question adout multiplayer
Post by: chief1983 on April 12, 2010, 09:50:58 pm
Sounds like that could be really useful.