Multiplayer Network Status...

Blitz3D Forums/Blitz3D Beginners Area/Multiplayer Network Status...

YellBellzDotCom(Posted 2008) [#1]
Ok, Ive been messing around with networking for my code for quite a while now. I made 1 version using my own UDP code, 1 version using TCP code and 1 version using Rottnet. I have major issues with each version as follows...

UDP - Actually this is the best version, FPS stays pretty high, Player movements are very good, messages look great with no fps loss. The only problem Im having with this version is my buddy will connect from another city, he can send messages but cant recieve any and I can see his char get created and move but he cant see mine. The server messages are getting blocked somehow. He tried hooking up his net straight to his computer and bypassing the router and turning Windows firewall off, still no go. This version was tested at home on my lan with 5 computers, worked great. Also tested with 1 of the pcs disconnectd from lan and connected using dialup, little laggy but it still worked great. Cant figure out why my buddy cant recieve the server messages. Maybe its dropping the first packet sent which initializes the connection, if that connection gets lost any following messages will not go through. I will try to code something that will resend the first message to see if that fixes it.

TCP - Major lagfest, everytime the player moves the fps drops on server. Everytime a message is sent, the fps drops on server. Dont see any way to optimize this.

Rottnet - Worked great for me and my buddy, we were able to connect but due to the size of Rottnet alot of overhead gets added to the code base, lost some fps due to extra processing. Have to get code going to be able to host more players. Didnt like the fact that since I didnt write the code theres alot of things I dont know how to change or optimize.

If anyone sees anything out of the ordinary or has any tricks they'd like to share I sure would appreciate it.


mikeful(Posted 2008) [#2]
Are you familar with NAT punching? Your UDP problems could be solved with it. http://www.mindcontrol.org/~hplus/nat-punch.html


YellBellzDotCom(Posted 2008) [#3]
Thanks for the reply Mikeful, we thought It may have been caused by firewall issues but I have dedicated internet from my machine and my buddy plugged his internet into his machine. We totally disconnected the routers to eliminate this problem in the troubleshooting process. I am thinking that the first packet may be getting dropped which would keep any other packets from being recieved properly. I will hard code a resend init packet and assign that to a button so I can resend that first packet as many times as I want to determine wether this is the problem or not.

Thanks for the help