Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thenick191

Pages: [1] 2
1
Hey, how would you recommend detecting if two players are super out of sync with each other or if there are too many packets trying to be processed and that's causing network lag?
Would you recommend detecting their average ping shortly after joining then if it gets significantly higher pause the game until the ping gets back to a reasonable number?

2
TNet 3 Support / Re: Occasional exception on tcplobbyserver
« on: June 01, 2015, 03:51:29 PM »
I changed the code and so far so good, maybe it works? I'll let you know if it breaks in the next day or so.

  1. while (mListener != null && mListener.Pending())
  2.                         {
  3.                                 TcpProtocol tc = new TcpProtocol();
  4.                 try
  5.                 {
  6.                     Socket sock = mListener.AcceptSocket();
  7.                     if (sock != null && sock.Connected)
  8.                     {
  9.                         tc.StartReceiving(sock);
  10.                         mTcp.Add(tc);
  11.                     }
  12.                 }
  13.                 catch
  14.                 {
  15.                     Console.WriteLine("THAT BAD EXCEPTION");
  16.                 }
  17.                         }

3
TNet 3 Support / Occasional exception on tcplobbyserver
« on: June 01, 2015, 11:12:57 AM »
Once in a while I get an exception in the ThreadFunction() on TNTcpLobbyServer on the line:
  1. tc.StartReceiving(mListener.AcceptSocket());

With people connecting from around the world it happens probably every other day. I'm guessing a connection did not terminate correctly and the socket didn't close, so the server thinks it's still open?

Any idea what could be done to fix this?

4
TNet 3 Support / Re: Issue across multiple networks
« on: April 26, 2015, 09:40:07 AM »
So it turns out I figured out what my issue was. My modem was acting like a router and I had a router coming off of it. After restarting the modem it once again knows it's a modem and not a router and TNet can successfully open ports.

5
TNet 3 Support / Re: Issue across multiple networks
« on: April 24, 2015, 08:58:39 AM »
Just to note, I am on TNet version 2.0.5

6
TNet 3 Support / Re: Issue across multiple networks
« on: April 24, 2015, 08:55:33 AM »
I tried actually forwarding the port and still no luck. The LobbyClient server says the game is hosted on port 8888. I forward on my router port 8888 to the IP of the machine running the game and the server started in code. Then I try to connect from my machine on another network and it just gives me a "Unable to connect" error. Can we discuss via skype or something. I have a deadline that I really need this working by.

7
TNet 3 Support / Re: Issue across multiple networks
« on: April 23, 2015, 08:23:00 AM »
I haven't tried actually going on my router and forwarding the port to this computer. I will try to do that today, but I assume it should work. Is there something I have to do with TNet to avoid having to forward ports?

8
TNet 3 Support / Re: Issue across multiple networks
« on: April 22, 2015, 03:04:25 PM »
The issue isn't with connecting to the lobby client in the cloud. I can register and unregister active games there without any issues. The issue is when I start a game server alongside the game and try to connect. Is there a step that I'm missing?

9
TNet 3 Support / Re: Issue across multiple networks
« on: April 22, 2015, 02:22:02 PM »
I'm incorrect there was the error message "No connection could be made because the target machine actively refused it."

10
TNet 3 Support / Issue across multiple networks
« on: April 22, 2015, 02:16:59 PM »
I can easily connect through LAN to computers on my network, but once I go somewhere else and try to connect to someone I have an issue connecting. It calls connect and then never fails nor completes. I have a lobby server set up on a remote computer (Digital Ocean).
I create a server locally when a player starts their game with some random game name and some port such as 7777.
  1. TNServerInstance.Start(tcpPort, 0, null, TNServerInstance.Type.Tcp, TNet.Tools.ResolveEndPoint(masterIP + ":" + masterPort), true);

Join code. ip and port are just grabbed from the Lobby Client known servers external address
  1. TNManager.Connect(ip, port);

I have no idea why I cannot connect. Do you have any tips?



11
TNet 3 Support / Re: Unable to connect on different networks
« on: February 27, 2015, 10:48:21 AM »
If I run the game from the Editor though and start a server I get the output "[TNet] UPnP Gateway: 192.168.1.1"
So I'm not sure exactly what the issue is now...I did check and verified that UPnP was enabled too.

12
TNet 3 Support / Re: Unable to connect on different networks
« on: February 27, 2015, 08:25:18 AM »
I did just run the server exe and it turns out there's no gateway found. I guess that's the issue?

13
TNet 3 Support / Re: Unable to connect on different networks
« on: February 27, 2015, 08:21:18 AM »
  1. TNServerInstance.Start(27010, 0, null, TNServerInstance.Type.Tcp, TNet.Tools.ResolveEndPoint(lobbyServerIP + ":" + lobbyServerPort), true);

That's what I'm using to start it up.

14
TNet 3 Support / Re: Unable to connect on different networks
« on: February 25, 2015, 10:21:02 AM »
So I did that and if I use the local IP of the sever it says no data received which is good. I try the external IP and no such luck. The game creates a server while running for the player to use and others to join. Is the only option I have to forward the port on the router? Or is there something else you can recommend doing?

15
TNet 3 Support / Unable to connect on different networks
« on: February 23, 2015, 03:19:06 PM »
I can connect fine on my local network. I have Tnet just connect using the local network IP. That works perfectly. I've tried going across networks and it's not working. I turned off firewalls and such too. I am using the internal external IP join method. Those are obtained from the lobby server and I verified that they are the correct IPs. Is there something else i should be aware of?

Pages: [1] 2