Creating a Multiplayer game PORT NUMBER?!

I have no idea what a port number is and I can't host games

Discussion about the game and its default mods.
Post Reply
Deepseaskateboard
Posts: 9
Joined: Wed Apr 25, 2012 11:20 pm

Creating a Multiplayer game PORT NUMBER?!

Post by Deepseaskateboard »

Hello,

Does anyone know what a port number is?

How do I configure it to work with my router?

I have no idea how to do this, and I can't host games!

Default 1234?!

Someone helppp!

Thanks!

gnychis
Posts: 8
Joined: Tue Apr 17, 2012 1:36 am

Re: Creating a Multiplayer game PORT NUMBER?!

Post by gnychis »

Deepseaskateboard wrote: Hello,

Does anyone know what a port number is?

How do I configure it to work with my router?

I have no idea how to do this, and I can't host games!

Default 1234?!

Someone helppp!

Thanks!
Tell us your router manufacturer and model, we'll try to help

Deepseaskateboard
Posts: 9
Joined: Wed Apr 25, 2012 11:20 pm

Post by Deepseaskateboard »

It is a BT Home Hub 3

http://www.shop.bt.com/learn-more/bt-br ... -9902.html

I may be able to figure out how to do it if the concept of ports were explained in detail, such as what do the numbers mean?! etc.

gnychis
Posts: 8
Joined: Tue Apr 17, 2012 1:36 am

Post by gnychis »

Think of it this way. There are multiple services that can run on your computer that want to accept an incoming connection. A client can send a connection request to your computer, but how does your computer know which "service" the connection is for? How does it know this connection is for Red Alert and not for your web server (assuming you were running a web server)?

How the computer knows which service the connection is going to is the port number. So for instance, if your Red Alert server is running on port 1234 then clients who want to play on your server will send a connection request to your computer for port 1234. On the other hand, if you were running a web server then somewhere out there in the world a web browser would send a connection request to your computer on port 80. Ports allow your machine to host multiple services cleanly, and for your computer to figure out which service connections should go to.

Now, why do you need to change a setting in your router? It's because of of what's called a NAT. When your cable or DSL modem connects to the Internet, it gets a single IP address. Let's call this your external address. With your wireless router, you want multiple machines to share that same address and connect to the Internet. Unfortunately, no two machines can have the same address otherwise how would you know which data was supposed to go to which machine?

A NAT is Network Address Translation. To allow multiple machines to use your single Internet IP address, your router sets up a NAT in which it gives you all local addresses (e.g., 192.168.1.100) and your wireless router takes the actual external IP address to the Internet.

So now here's the trouble. Someone sends a connection to your external IP address to connect to port 1234 for Red Alert. Well, that connection is received by your router and it doesn't know which local computer connected to it that it should send that actual connection to. Remember, there are multiple computers connected to your router.

So what you configure your router to do is say: "Hey! If you get a connection on your external address for port 1234, send it to my computer: 192.168.1.100" Then your router will do just that, and people can connect to you.

What you need to know is your local machine's IP address, and then go through your router configuration and look for something like "Port Forwarding" or "Application Services" or something like that. Set the local address to your address, and the external and internal ports to both 1234. You can do this for both TCP and UDP.

Alternatively, your router probably has a setting called the DMZ host. You can set the DMZ host to your local machine which, if the router gets a connection on a port and it can't figure out which local machine to send it to, it will send it to the DMZ host like a default.

Hopefully that helps.

Deepseaskateboard
Posts: 9
Joined: Wed Apr 25, 2012 11:20 pm

Post by Deepseaskateboard »

Ok, So I figured all this out.

I set my NAT to the same port as the games, so TCP/UDP 1234 and NAT to 1234.

Then I had to assign the port to my comp.

So I can now host games.

The problem is, the games I host seem to have lag.

Ill explain a bit about the setup.

It is a home network using fibre broadband that is supposed to get 20meg, but realistically it gets about 2.5 meg download.

I have ethernet all through the house and my comp is connected to a gigabit unmanaged ethernet switch then to the router.

My computer is a mac, running 10.7.3 and is a quad core 2.66ghz i5

Now... is there any way to improve the speed of the game when I host?
Is my set up suitable for hosting a game?

Thanks!

Kanar
Posts: 54
Joined: Mon Apr 30, 2012 1:39 pm

Post by Kanar »

Hosting lags for me too, when there are more than 6 players.

I only got 4000 kbit/s, CPU is intel i5-750 @ 4x 4200 MHz.

gnychis
Posts: 8
Joined: Tue Apr 17, 2012 1:36 am

Post by gnychis »

when you say "lag" what do you experience?

keep in mind that some of your opponents may be in entirely different parts of the world than you

Deepseaskateboard
Posts: 9
Joined: Wed Apr 25, 2012 11:20 pm

Post by Deepseaskateboard »

Just slow game play.

Some other people host and it is really smooth.

The best games I have played on open RA are hosted by static dump.

They run real smooth.

He said he had a 6 core machine, but surely open RA doesn't need 6 cores!

Is it a computer speed problem or network connection that causes the lag?

Is there anything that can be done to reduce it by configuring something or other?

Kanar
Posts: 54
Joined: Mon Apr 30, 2012 1:39 pm

Post by Kanar »

I think it's not a CPU-based problem in your case;
but just to make sure, why don't you host a game and check CPU usage on all cores and memory?

Deepseaskateboard
Posts: 9
Joined: Wed Apr 25, 2012 11:20 pm

Post by Deepseaskateboard »

HI Kanar,

I think we have played a few games together!

I'm Ed! =P

Memory is 12gb so surely can't use more than that!

I could try a quick game with a few players.

See how it works out.

Kanar
Posts: 54
Joined: Mon Apr 30, 2012 1:39 pm

Post by Kanar »

Yes we played some battles, didn't know you are Ed. :-)


I made similar experiences when hosting with too many people:
Slow gameplay.

No connection losses, no "pauses" in game or invisible units, just everything is sloooooow.
Reminds me more of chess than real time strategy. :-)

6 people are fine though.
Someone also said the size of the map can slow things down.
Maybe you try a middle size map like con and see how things are going, otherwise I am clueless. :o

Matt
Posts: 1144
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »

Maybe the network protocol is bandwidth hungry. I am not sure as I have a weak subnotebook and only 3k aDSL.

User avatar
riderr3
Posts: 98
Joined: Sat Feb 26, 2011 11:26 pm
Location: Camo pillbox
Contact:

Post by riderr3 »

Hosted 2vs2 game without any lags on Ubuntu

Post Reply