Log in

View Full Version : The RULES of Multiplayer...


Raptisoft
07-19-2004, 12:24 PM
Hi all,

I have a question. I've just wrapped DirectPlay into a class and made a little chat program with it. The next Raptisoft program will be multiplayer.

BUT! I have a question, for those of you who might know. Some background:

Routers kill the multiplayer, obviously. If you don't set up a DMZ on both ends, then the chat program doesn't work.

BUT, I know that Port 80 gets through routers by default.

Is it kosher to set your multiplayer up to go through port 80, or is that frowned up as unethical or whatnot?

Fenix Down
07-19-2004, 12:38 PM
BUT, I know that Port 80 gets through routers by default.


What do you mean? You need to forward port 80 if you want to run a web server. None of the ports are forwarded by default.

Raptisoft
07-19-2004, 12:46 PM
I mean, very emperically, just from experimentation, because I don't know the tech manual rules, that if I set the DirectPlay port to its default, it will not connect through a router. If I set the DirectPlay (this is in the program, not on the routers) port to 80, then the program works.

princec
07-19-2004, 01:31 PM
This is for servers only. If you want to listen, your router/firewall will almost certainly thwart your efforts (and if not, it should be in the bin).

Port 80 is not even left open usually unless it's specifically set up.

Cas :)

ggambett
07-19-2004, 02:49 PM
If the game is turn based (or slow enough) you could get away using only outbound port 80 - that is, doing standard HTTP requests. This means you'd need a central server to have the game state, with the clients sending updates and getting the game state back doing HTTP POSTs every 1-2 seconds (or longer, depending on the type of game)

ScrewBall
07-19-2004, 02:56 PM
Well, because no one has really come out and said it yet, you shouldn't really use registered ports for protocols other than their own. By that I mean Port 80 should be used for http traffic, Port 21 for ftp traffic etc. You basicly have two options when it comes to network game ports. The first is set a high port (above 1024) or allow the user to specify a port to use. If your looking at building a game server then you need to arrange to get the ports you use for they game opened by your hosting company (Dedicated servers witht their own IP will usually get their own, customizable firewall).

wazoo
07-19-2004, 08:43 PM
I second the idea of at least allowing the user to customize their own port value (ie. through a config file or whatever if you don't want to make it part of a GUI).

Some people have pretty standard home network setups (ie. cable into wall), while others have damn near 4 levels of firewall, proxy server, router, LAN configurations to get IP traffic through.

If you don't want to make it customizeable, at least put the port value you are using in a very easy to find place in the game documentation. I can't tell you how many times I've been frustrated by games who won't allow you to select a port AND don't bother to publish anywhere what value they ARE using. No information on their website either... :mad:

Won't buy games from those companies anymore. :(

Well, because no one has really come out and said it yet, you shouldn't really use registered ports for protocols other than their own. By that I mean Port 80 should be used for http traffic, Port 21 for ftp traffic etc. You basicly have two options when it comes to network game ports. The first is set a high port (above 1024) or allow the user to specify a port to use. If your looking at building a game server then you need to arrange to get the ports you use for they game opened by your hosting company (Dedicated servers witht their own IP will usually get their own, customizable firewall).

Raptisoft
07-20-2004, 05:10 AM
Thanks everyone.

I think putting a port value in a cfg file works. You're correct that I don't want to make it part of a GUI-- I want the user to be able to start a game by clicking TCPIP -> HOST -> ENTER GAME NAME AND GO.

Thanks again.