Directplay

Blitz3D Forums/Blitz3D Programming/Directplay

Drackbolt(Posted 2006) [#1]
Let's assume I'm stuck working with Directplay and the other net libs aren't an option. Will Hostnetgame and Joinnetgame work across the internet without problems? They both require a server name as input, so my main question was whether the naming would work properly with at least one router in between. Has anyone out there gotten a directplay session to work over the internet like this, and if so, would you please share your experience? Thanks everybody.


jfk EO-11110(Posted 2006) [#2]
It seems most people don't use it, for several reasons, including speed. Maybe you better try to find some answers on directX specific pages.

It's only a guess, but couldn't you use an IP instead of a server name?

And why are other libs no option? Isn't it all only cooking with water?


kevin8084(Posted 2006) [#3]
It should work with a router between. Assuming no port forwarding, the router MAY act as a dns server (or dhcp server) but this should cause no problems. My own setup is a network inside of a network, using router on one and gateway on the other. I've not had any problems with accessing netplay before.


Drackbolt(Posted 2006) [#4]
Hey JFK, if you aren't going to help, don't post.

Kevin8084, what do you mean "network inside of a network"? Where are the two nodes in relation to the router and gateway? My main problem is that I can get LAN games to work, but never WAN games of any kind, no matter what settings for port forwarding or DHCP or whatever I choose. I'm behind a router, and I can't get anyone else to join in (nor can I join in anyone else's games either).


LineOf7s(Posted 2006) [#5]
Hey JFK, if you aren't going to help, don't post.

If you ever want any help around here again, you'd be well-advised to seriously curb that sort of attitude - especially since he was certainly on the helpful side of indifferent in my eyes.


Dreamora(Posted 2006) [#6]
Problem is that DirectPlay does not use 1 port but a large port range ... for that reason, it is not a that liked protocol (no somewhere next to intelligent user goes all DMZ just for a laggy slow networkprotocoll normally)


kevin8084(Posted 2006) [#7]
I have a gateway that is hooked up as a phoneline network, and another network (kind of a hybrid ring topology) that is hooked into the phoneline network. Some of the computers are hooked to one network, some computer to the other. The computers on one network never see the computers on the other network. On the "ring" network I use a router that acts as a dhcp and dns server. On the gateway I use the dsl modem. Each of the computers have two IP addresses - the internal IP that is used by the network, and the external IP that is seen by the internet. In this case, the external IP address is a proxy...that is, it is the gateway's IP address that all of the computers share.


Ryudin(Posted 2006) [#8]
I dont know, kevin, but i have found the same problems. I hope that's fixed in the next update.


Dreamora(Posted 2006) [#9]
There is no problem.
Thats how this "protocoll" works or does not work depending on the networksetup. So nothing to be fixed.

DP is not used for good reasons, as it can at best be used for turn based stuff or chat, where even using tcp directly most likely ends with an easier and far better solution.

There are networking systems for Blitz you could use that base on UDP and / or tcp and offer similar functionality without the problems of DP. (one that springs to my mind is GNet)


Drackbolt(Posted 2006) [#10]
Hey LineOf7, if you're not going to help... Curb your own tendencies to be the policeman and move along. Must I reiterate again that I am asking for help with Directplay? People trying to discourage me from using it is not helpful in the slightest for this topic.

Anybody: It's my understanding that Directplay uses both TCP port 47624 (to initialize a server) and UDP ports 2300-2400 (for send/receive). If it uses UDP, what exactly makes it so slow? What's the overhead?

Kevin8084: Thanks for the info. So it sounds like you have a similar setup to what I am talking about, but you have no problems. Do you have an example Directplay program I could try out, or can you verify which ones have worked for you?

Ryudin: You have the same problems as I describe? Can you give more detail please?


kevin8084(Posted 2006) [#11]
I just successfully ran the fpnet demo program from the code archives: http://blitzbasic.com/codearcs/codearcs.php?code=1142 but nobody was playing. According to the include file (at the bottom of the fpnet code), your computer will connect to gnet.php on port 80