a simple request

Discuss the future of Warzone 2100 with us.
rush2049
Trained
Trained
Posts: 88
Joined: 05 Sep 2006, 01:52
Location: Lancaster, PA

a simple request

Post by rush2049 »

could one of the dev's who know the code for the multiplayer side of things add a few lines for me.

You see when hosting a game it is rather cumbersome to have to alt tab out and find my ip address, could someone add a little code so that it would appear in the bottom or top of the screen somewhere, thankyou...
Baum
Trained
Trained
Posts: 54
Joined: 14 Jun 2008, 22:57

Re: a simple request

Post by Baum »

Maybe this could be done by displaying the IP address in the console when a certain key or key combination is pressed? This shouldn't be hard to do and I could probably get to it in the next few days (unless someone else wants to do it). Is there any reason why this solution wouldn't work or be tough to use?
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: a simple request

Post by EvilGuru »

Oscar Wilde wrote:The pure and simple truth is rarely pure and never simple.
Exactly what IP address would you present the user with? The system I am currently ssh'ed into has 3 non-local addresses. Which one would you give? How do you know which one the user wants?

(The netcode solves this issue by binding to every available address.)

Furthermore, due to the wonders of NAT it is impossible to know ones external IP address. Unless that is we ask the lobby server for it when we connect to it. But, again, is this the address we want?

Bonjour/ZeroConf is a much better option in the long run.

Regards, Freddie.
Baum
Trained
Trained
Posts: 54
Joined: 14 Jun 2008, 22:57

Re: a simple request

Post by Baum »

I was going to list all of the IP addresses but then I decided to ignore any basic networking knowledge to completely forget that NAT even existed. Thanks for bringing me back to reality ;)
rush2049
Trained
Trained
Posts: 88
Joined: 05 Sep 2006, 01:52
Location: Lancaster, PA

Re: a simple request

Post by rush2049 »

Well, for a lan/ direct ip game list the local ip, the IPv4 address, for each network card.

For internet game list the NAT address.

I don't know, it should be simple, the reason I ask is because it is annoying to have to exit to find my ip all the time, especially for lan games where it is assigned via dhcp and changes from time to time.
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: a simple request

Post by EvilGuru »

The IP address dialog box also supports machine names. So long as you also have a DNS server running (highly likely if you have DHCP) you can just enter a friendly computer name into the box.

Regards, Freddie.
rush2049
Trained
Trained
Posts: 88
Joined: 05 Sep 2006, 01:52
Location: Lancaster, PA

Re: a simple request

Post by rush2049 »

didn't know that, ok that makes it easier...
Baum
Trained
Trained
Posts: 54
Joined: 14 Jun 2008, 22:57

Re: a simple request

Post by Baum »

The problem with listing the external IP address of a router utilizing NAT is that NAT is basically transparent to the devices in the LAN and the only way to get the external IP address is to query a device external to the LAN (there isn't a standard way to query the information from the NAT router). You can get the external IP address from a few websites but I don't think they would be too happy with unsolicited traffic from the game. In this case, you would still need to forward ports to your local IP address, which you would require you to know (and set) at least one IP address anyways (unless there is some way to forward ports based on a MAC address...).
rush2049
Trained
Trained
Posts: 88
Joined: 05 Sep 2006, 01:52
Location: Lancaster, PA

Re: a simple request

Post by rush2049 »

I have found some advanced routers have options to forward ports based upon mac addresses, but I have only seen that once. When trying to find an external ip, I find google.com a good place to ping, all that I really wanted was when hosting a local game to have the local ip shown, this makes the guy sitting right next to me and the guy next to him able to get the ip of the game much easier. I am sorry it turned into a large discussion.
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: a simple request

Post by EvilGuru »

rush2049 wrote:I have found some advanced routers have options to forward ports based upon mac addresses, but I have only seen that once. When trying to find an external ip, I find google.com a good place to ping, all that I really wanted was when hosting a local game to have the local ip shown, this makes the guy sitting right next to me and the guy next to him able to get the ip of the game much easier. I am sorry it turned into a large discussion.
We can set the lobby server to return your external IP when you connect.

Regards, Freddie.
rush2049
Trained
Trained
Posts: 88
Joined: 05 Sep 2006, 01:52
Location: Lancaster, PA

Re: a simple request

Post by rush2049 »

Thank you Freddie.