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 - voncarp

Pages: [1] 2 3 ... 7
TNet 3 Support / Re: NAT 64 Network Connection Problems
« on: November 15, 2016, 06:56:26 AM »
Thanks for your continued help cmifwdll.

I am not sure what to do at this point.

While trying the latest TNet version in an empty project, TNServer.exe doesn't even seem to work with iPv6.  Using this on the server: TNserver.exe -ipv6. It just shows a list of IP addresses and goes straight to "press q followed by enter to quit."  And the port says its filtered.

Using this on the server: TNserver.exe. without -ipv6 it shows list ips, admin, bans, gameserver, etc.  The port shows open.

Again, hopefully Aren chimes in. Because its not working.

Also, it doesn't seem like I can modify/delete my posts anymore. Hence, I double posted.

TNet 3 Support / Re: NAT 64 Network Connection Problems
« on: November 15, 2016, 02:39:55 AM »
Hi cmifwdll,

Thanks for the response. I remember you and Aren were able to connect to the  server from the example scene in a post I made a several months ago. I was never able to connect to that server in any way with the example scenes from TNet.

If I can make the connection on this iPv6 testing environment that they use, even in the example scenes:

I would just attempt to connect with iPv6 first several times with the appropriate IP address/port and then fallback to iPv4 with other IP addresses/port if it continues to fail. The problem is I cannot connect with iPv6 at all. There are only four possible combinations to use between TNserver.exe and the client and I've tried them all:

client side addressFamily = IPType.IP_v_4/IPType.IP_v_6  to TNServer.exe -iPv6/ no ipv6

I cannot figure out what I am doing wrong here. I am almost tempted to suggest that TNet is not able to pass Apples NAT64 Network requirements.

cmifwdll, When you connected to that server several months ago, what type of network were you on when you connected?

TNet 3 Support / Re: Migrating from UNet to TNet: What's involved?
« on: November 15, 2016, 02:33:06 AM »
You could scratch the Network Animator and write your own animation functionality.  Use [Command] to activate your animations separately when the animation parameters changes. Kinda like how you would do it on TNet.

TNet 3 Support / NAT 64 Network Connection Problems
« on: November 14, 2016, 09:40:45 PM »
My IPv6 woes continue as Apple has rejected my new game because of connectivity issues. I made a grave mistake of making another project without being 100% sure that this worked.

I spent the last 5 months on this project and could use some assistance. Every time I attempt to connect in with iPv6 on a NAT 64 network in any capacity it says "unable to connect". I've played with TNet's example scene considerably trying to make this work to no avail.

Here is how my iPhone reads on a basic router.

Here is how my iPhone reads on a simulated iPv6 network. The IP is likely the MacBook IP address that is synthesizing the iPv6 network. I am guessing that somehow that DNS is key to my connectivity on this issue.

Other research I have been looking at:
This eskimo guy is apparently Apple's network guru.

A bit frustrated, I toyed with UNet and Photon. They connect painstakingly easy in their example scenes without any setup at all. I can connect to anything on the web with this iPv6 network except my TNserver.exe. It will take too long to rewrite my project with another library and as a 2+ year TNet user, I want to stay with TNet.

Please help.

TNet 3 Support / Channel Transfer
« on: October 16, 2016, 08:13:19 AM »
My player seems to be getting destroyed while switching channels.  Walking around a streaming map he disappears.  While debugging OnDestroy() I can see the player still in channel 60 and 64. Of course this is after he is destroyed.

It took awhile to trace why he was getting destroyed. If I remove the TNObject, he won't be destroyed. I'm only testing on one device and this still happens.  I am thinking he is getting destroyed on the transfer, but he is not making the transition to the new channel.

I am using the ExamplePlayerAvatar.cs script for channel transfer.



Playing with the multiple channel example scene. If you spawn in two cars. The second car has priority. Which means the second will take control of the camera and won't be destroyed while switching channels. In my case, perhaps it doesn't know.  I can't seem to find anything yet that lets TNet know not to destroy the object while transferring channels.

TNet 3 Support / Re: Communication with Lobby Server
« on: September 26, 2016, 04:23:00 AM »
i believe i got everything working as-is without commenting out that line.

iirc, it was related to tracking TNLobbyClient.errorString...


On a new copy of TNet3, to get an output on the lobby server as this:

[2016/09/26 15:57:15] + My Server (0)

with :

  1.         void ServerStart() {
  2.                 TNServerInstance.serverName = "My Server";
  3.                 //Doesn't work/show output without devomages changes
  4.                 TNServerInstance.Start(5128, 0, null, TNServerInstance.Type.Tcp, Tools.ResolveEndPoint(lobbyUrl + ":" + lobbyPort.ToString()));// ""));      
  5.         }

I needed to comment out the line mentioned in your other thread. Which I am guessing everyone with a new copy of TNet will have to as well.

Also, looking over your threads, so you are using

TNserver.exe -name "Lobby" -tcpLobby 5127

TNserver.exe -name "LobbyServerToConnect" -tcp 5128 -tcpLobby 5127

TNserver.exe -name "GameServer in US" -tcp 5128 -tcpLobby 5127

TNserver.exe -name "GameServer in Canada" -tcp 5128 -tcpLobby 5127

Is that right?   And then you can direct connect to "LobbyServerToConnect" to perform the centralized functionality Aren was talking about.

TNet 3 Support / Re: Communication with Lobby Server
« on: September 25, 2016, 11:15:20 PM »
The lobby server can save and load files, and you can expand it to add player verification (login name / pass) support. You can change the lobby server's logic to only send the list of servers the player is eligible for as well -- if you wanted private or beta servers for example. Connect to the lobby, verify, download your player file. You can then connect to a game server from the lobby's list and set the player data to whatever was in the player file. When disconnecting, save the player's data as a file on the lobby server.

Lobby server's code can be found in TNTcpLobbyServer.cs. You would be adding new packet support to its ProcessPacket() function.

So, back to TNET fundamentals 101, when you say connect to the lobby, do you mean connect via TNGameserver or directly like you would connect to the gameserver?

Using one script and the latest TNET3:

  1. using UnityEngine;
  2. using TNet;
  4. public class test : MonoBehaviour {
  6.         public int lobbyPort = 5127;
  7.         public int serverTcpPort = 5128;
  8.         public string lobbyUrl;
  10.         public bool connectLobby;
  11.         public bool startServer;
  14.         void Update () {
  15.                 if (connectLobby) {
  16.                         connectLobby = false;
  17.                         LobbyConnect ();
  18.                 }
  19.                 if (startServer) {
  20.                         startServer = false;
  21.                         ServerStart ();
  22.                 }
  23.         }
  25.         void LobbyConnect() {
  26. //              TNManager.Connect (lobbyUrl, lobbyPort);                                                //doesnt connect to lobby
  27. //              TNManager.Connect (lobbyUrl + ":" + lobbyPort.ToString());              //doesnt connect to lobby
  28.                 TNManager.Connect (lobbyUrl + ":" + serverTcpPort.ToString());  //works connects to gameserver
  29.         }
  31.         void ServerStart() {
  32.                 TNServerInstance.serverName = "My Server";
  33.                 //Doesn't work/show output without devomages changes
  34.                 TNServerInstance.Start(5128, 0, null, TNServerInstance.Type.Tcp, Tools.ResolveEndPoint(lobbyUrl + ":" + lobbyPort.ToString()));// ""));       
  35.         }
  36. }

Also, a new copy with no changes has the same issues as in this thread while adding a gameserver to the lobby server. No output shows, but after following devomage comments it will show some output.

Hopefully, cmifwdll drops in. Will happily buy him a copy of TNET3 if he wants to jump in on these discussions  ;)

  2. if (reader.ReadUInt16() != GameServer.gameID) return false;
  3. Tools.Print("HERE"  + mTime);      //line 332
  4. tc.Set("lastSend", mTime);/code]

TNet 3 Support / Re: Server to Lobby + Server to Server communication
« on: September 25, 2016, 10:44:01 PM »
...and this thread wasnt worthy of a response...  i stopped working on this the following day.

anyways, I happened to do an incomplete write-up of how I achieved this.  beware:  not a ton of testing was done and the kicker is what to do if the lobby server goes offline.  ie  packet que?  idk

example usage:
(within TNGameServer.cs)

lobbyLink.SendPacket(Packet.LobbyLink_RequestAuth, user_id,, username, password);

PS  i do not want to support this code - feel free to do what you like with it.  i was using a stand-alone lobby server with mysql and 3 stand-alone servers - if some snippets are missing from the lobby code let me know.

Thanks for putting the effort into that response. I actually got some output going on the lobbyserver from the gameserver based on this before I replied:

  1. //TNLobbyLink.cs
  2. public virtual void SendPacket(Packet packet, params object[] objs)
  3. {
  4.         mLobby.SendPacket(packet, objs);
  5. }

Just to tack on to the earlier remarks, I could only hold about ~150 players per external server before things got bad. 10 players per channel. My stuff is likely not written as efficiently as Arens.  Also, it was a FPS game on mobiles, so processing, AI, and other logic runs a bit slower on your phone. Another footnote, some dedicated server providers share your server connection with other servers.  So, randomly at times ping got bad across the board.

TNet 3 Support / Communication with Lobby Server
« on: September 25, 2016, 11:51:59 AM »
Trying to get a centralized location for verification of players and storage of players.  For instance, saving/loading from the lobby server to play on different gameservers. 

I've read all over the forums that you need a custom Lobby Server, but I haven't seen much follow up or examples.

What would be your suggestion in loading/saving a player on a centralized Lobby to play on different Gameservers. I have a few servers spread out: US, Europe, and Asia. At the moment, in my games players grab/switch characters from the respective server they play on.  I am hoping to have the characters available across any server and never on the device.

Can you push me in the right direction?

TNet 3 Support / Re: Server to Lobby + Server to Server communication
« on: September 25, 2016, 11:43:29 AM »
Would you be willing to expand on how you were able to accomplish this?  This functionality seems very useful.

I've been struggling to get communication going with the lobby server.  Custom packets are easy with the gameclient and gameserver. But, with the lobby, I can't seem to get it going. I was able to get some output on Debugs from the TNGameserver to TcpLobbyServer but I am not sure really if the direction I am going is the the right/efficent solution.

Would appreciate any feedback.

TNet 3 Support / Re: Compile new TNServer.exe
« on: September 15, 2016, 12:51:09 AM »
-fn doesn't appear to work in the latest version.

  1.                         else if (param == "-fn")
  2.                         {
  3.                                 fn = val1;  //change fn = val0; seems to fix
  4.                         }

TNet 3 Support / Re: Testing IPv6 on iOS
« on: July 30, 2016, 03:42:21 PM »
I am still unable to connect. But, I think the setup is right:

Verified the port is open for IPv6

And the TNServer.exe

I ran this from an iPhone with the useIPv6 bool = true. I ran it from the iPhone because I am certain that is a NAT 64 network. When useIPv6 bool = false it shows IPv4 in LAN and WAN. Either way it was unable to connect. I updated to the latest TNet3 and used the latest

Would you be able to try to connect to that when you are back online?



The ports didn't seem like they were open last night.  After some modification and according to those two sites they are open now.

TNet 3 Support / Re: Testing IPv6 on iOS
« on: July 30, 2016, 06:34:40 AM »
Hmm. The thing is, I am not using a router.  I am using several different dedicated servers with Windows Server 2008 and 2012.  My test servers are from  The TNServer.exe I uploaded there. I felt my location, Hawaii; was not favorable for connections.

This is from the external dedicated server on

And I have been swapping in and out of TNServer.exe IPv6 and IPv4 for testing. ipconfig

Maybe on the dedicated server, I am missing a step to get this to work.  5127 shows open on IPv4, just not IPv6.

I'll have to continue research in the morning. Very much appreciate the support  ;D

TNet 3 Support / Re: Testing IPv6 on iOS
« on: July 30, 2016, 05:46:18 AM »
Interesting.  So opening a port for IPv6 is different than IPv4?

Using a different server and IPs for port 5127


The IPv4 shows open.
The IPv6 shows closed.

To check this.

Ran out of tries with You only get 3 in one day  :-\

The original server and IP's display the same result. Open on IPv4 and closed on IPv6.


I'll have to investigate more on how to get the IPv6 port open. Feel free to share any thoughts :)

TNet 3 Support / Re: Testing IPv6 on iOS
« on: July 30, 2016, 02:10:39 AM »
Using on the server yields:

And trying to connect again

I left the TNServer.exe and port open for this test. Are you able to connect from your side?


Pages: [1] 2 3 ... 7