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

Pages: 1 [2] 3 4 ... 6
16
TNet 3 Support / Re: Send RFC Error on manuel added TNObject
« on: October 18, 2016, 11:57:07 AM »
Thank you very much for your explanation.

I put now my ChatUI on the main game scene. And this works now like a charm.
But if i switch the channel, for example if i switch from the main world to an dungeon, the TNO doesnt work anymore.
Must i put in every scene the ChatUI? Can't i transfer the tno to my new channel?

This is my test script to transfer the tnobject to my new channel.
  1.     public int lastChannelID = 0;
  2.     protected override void OnEnable()
  3.     {
  4.         base.OnEnable();
  5.  
  6.         TNManager.onJoinChannel += OnJoinChannel;
  7.     }
  8.  
  9.     void OnDisable()
  10.     {
  11.         TNManager.onJoinChannel -= OnJoinChannel;
  12.     }
  13.  
  14.     private void OnJoinChannel(int channelID, bool success, string msg)
  15.     {
  16.         if(lastChannelID == 0) //configure our first world channel
  17.         {
  18.             Debug.Log("no Transfer");
  19.             lastChannelID = channelID;
  20.         }
  21.         else if (lastChannelID > 0 && lastChannelID != channelID && tno.isMine) //we dont transfer because tno is not mine!
  22.         {
  23.             Debug.Log("Transfer");
  24.             tno.TransferToChannel(channelID);
  25.             lastChannelID = channelID;
  26.            
  27.         }
  28.  
  29.         Debug.Log("tno.isMine: " + tno.isMine); //tno is not mine!
  30.     }
  31.  
  32.     void Awake ()
  33.     {
  34.         DontDestroyOnLoad(gameObject);
  35.         }

If you see in the commands, in "OnJoinChannel" im not the owner of the current channel, so i can't transfer it.

17
TNet 3 Support / Re: Send RFC Error on manuel added TNObject
« on: October 18, 2016, 08:56:29 AM »
TNManager.Instantiate will instantiate it on all clients, and all incoming clients. Or not?
So i cannot Instantiate my whole menu ui on all clients, it should stay local.

How can i send Chat messages without instantiating an own chat ui prefab.

18
TNet 3 Support / Set Player Limit doenst work?
« on: October 18, 2016, 06:51:47 AM »
After i created the channel, i set the Player limit.
And in the update Method i have this
  1. TNManager.GetChannel(GameManager.Instance.m_worldChannel).playerLimit) //m_worldChannel is my current channelID

And its always 65535, does it not work??

19
TNet 3 Support / Re: Send RFC Error on manuel added TNObject
« on: October 18, 2016, 02:20:07 AM »
If i dont change the values on TNObject at runtime and join the channel "0" i got the same problem.
My first RFC doesnt work, but others does. The problem seems not to be solved.

//EDIT: I tried to Add the TNObject in live ingame and set the uid. The TNObject is now in my "Game" Channel, but if i try to send an RFC i got the same problem, first RFC fails.
Example Code i used:
  1. void OnEnable()
  2.     {
  3.         TNManager.onJoinChannel += OnJoinChannel;
  4.     }
  5.  
  6.     void OnDisable()
  7.     {
  8.         TNManager.onJoinChannel -= OnJoinChannel;
  9.     }
  10.  
  11.     private void OnJoinChannel(int channelID, bool success, string msg)
  12.     {
  13.         if(channelID>0)
  14.         {
  15.             gameObject.AddComponent<TNObject>().uid = 55;
  16.         }
  17.     }

To explain what i want. I want to have an Channel for all non game related RFC's like Chat and so one. How do i manage this?

//EDIT 2: I made a little quick fix.
I changed the RebuildMethodList() Method in TNObject to public.
And after line 636
  1. MonoBehaviour mb = mbs[i];
I added this
  1. if (mb == null)
  2. return;

And on my MenuManager i changed this:
  1. void OnEnable()
  2.     {
  3.         TNManager.onJoinChannel += OnJoinChannel;
  4.     }
  5.  
  6.     void OnDisable()
  7.     {
  8.         TNManager.onJoinChannel -= OnJoinChannel;
  9.     }
  10.  
  11.     private void OnJoinChannel(int channelID, bool success, string msg)
  12.     {
  13.         if (channelID > 0) //DO WE JOINED THE WORLD CHANNEL?
  14.         {            
  15.             tno.RebuildMethodList();
  16.         }
  17.     }

Now, if i send an RFC, after i joined, i got no more Exceptions. Seems to be a fix, but a dirty one  ;D

20
TNet 3 Support / Re: Send RFC Error on manuel added TNObject
« on: October 18, 2016, 01:22:18 AM »
What i mean with "manually added TNObject" is,  i have an GameObject in the Editor with all my UI. And there is also the ingame chat.
So i put on the parent an TNObject on it and my MenuManager script in the Awake Method i have this:

  1. tno.channelID = 50;
  2. tno.uid = 51;

I made it a little bit like the chat example. And i thought to use two Channels.
One Random, where is my "Game"(Pos sync etc) Channel.
And an another Channel what is my Data(Chat, GameManager RFCs, etc) Channel.

21
TNet 3 Support / Send RFC Error on manuel added TNObject
« on: October 16, 2016, 10:07:09 AM »
I have one gameobject which has an manuel added TNObject.
And when i send a RFC the first RFC give's me an Exception.
Every other RFC works perfectly without Errors.

Here is the Error Code:

  1. 1 0 SendChat
  2. Object reference not set to an instance of an object
  3.   at TNet.TNObject.RebuildMethodList () [0x00034] in D:\Unity\CartoonTown\CartoonTown_source\Assets\Extras\TNet\Client\TNObject.cs:637
  4.   at TNet.TNObject.Execute (System.String funcName, System.Object[] parameters) [0x0002a] in D:\Unity\CartoonTown\CartoonTown_source\Assets\Extras\TNet\Client\TNObject.cs:541
  5.   at TNet.TNObject.FindAndExecute (Int32 channelID, UInt32 objID, System.String funcName, System.Object[] parameters) [0x00014] in D:\Unity\CartoonTown\CartoonTown_source\Assets\Extras\TNet\Client\TNObject.cs:603
  6.   at TNet.TNManager.OnForwardedPacket (Int32 channelID, System.IO.BinaryReader reader) [0x00022] in D:\Unity\CartoonTown\CartoonTown_source\Assets\Extras\TNet\Client\TNManager.cs:1809
  7. UnityEngine.Debug:LogError(Object)
  8. TNet.TNManager:OnForwardedPacket(Int32, BinaryReader) (at Assets/Extras/TNet/Client/TNManager.cs:1813)
  9. TNet.GameClient:ProcessPacket(Buffer, IPEndPoint) (at Assets/Extras/TNet/Client/TNGameClient.cs:984)
  10. TNet.GameClient:ProcessPackets() (at Assets/Extras/TNet/Client/TNGameClient.cs:918)
  11. TNet.TNManager:<ProcessPackets>m__9() (at Assets/Extras/TNet/Client/TNManager.cs:528)
  12. TNet.TNManager:Update() (at Assets/Extras/TNet/Client/TNManager.cs:1823)

22
TNet 3 Support / Re: Add to externalAddress the UDP Port to Ping Gameserver?
« on: September 19, 2016, 01:51:02 AM »
Aaaah, okay thanks  :)

23
TNet 3 Support / Add to externalAddress the UDP Port to Ping Gameserver?
« on: September 18, 2016, 12:24:35 PM »
Hi,

i just had an problem to ping Gameserver.
So, i took a deeper look, and the externalAddress has the TCP Port. Take a look on my example below.

Is it possible to add an variable more with the UDP port?
For example
  1. ent.externalAddress.UDPPort

  1. TNet.List<ServerList.Entry> list = TNLobbyClient.knownServers.list;
  2.  
  3.         for (int i = 0; i < list.size; ++i)
  4.         {
  5.             ServerList.Entry ent = list[i];
  6.  
  7.             Debug.Log(ent.externalAddress); // IP:TCP PORT
  8.  
  9.             TNManager.Ping(Tools.ResolveEndPoint(ent.externalAddress.Address.ToString(), ent.externalAddress.Port+1), OnPing);
  10.         }
  11.  

The Ping works now, but if you could add this little thing, this would be very helpfull.

24
TNet 3 Support / What do you guys think about a Chat like Slack, Jabbr?
« on: September 07, 2016, 03:12:41 PM »
Hey guys,

i started with TNet on January 2014, and after some time i missed some features and went to Bolt Networking.
After the lack of development, i thought to switch to UNet. But this seems to be buggy as hell...
I tried Forge Networking aswell, but seriously, i could took my money and through it into a fire, would be better invested...
So, now im back to TNet and i think i will stay here!

Both(Bolt, Forge) have a Support Chat, they use Slack and its really nice.
It's very usefull, you can support live, and experienced user can help each other.

Should we try it?

25
TNet 3 Support / Ping a Game Server doesnt work?!
« on: September 07, 2016, 03:02:33 PM »
Hey,

i just upgraded to 3.0 and im happy to see what you have done so far, really nice.

But i have a question.
My Game Servers are registered to one Lobby Server.
The Client connects to the Lobby Server to retrieve all registered Game Servers.
And my plan is now, to connect to one server with the lowest latency.

But i cannot use TNManager.Ping(ip, callback) to check the latency of every server.
The error was something like, i need to be connected to one Game Server to make a Ping...

Im using now the build in Ping Command of Unity.

  1. Ping p = new Ping(ent.externalAddress.Address.ToString());
  2. while (!p.isDone) { }
  3. Debug.Log("tome: " + p.time);

26
TNet 3 Support / Re: Old TNet 2.0 Customer question about 3.0
« on: September 06, 2016, 11:00:22 AM »
Thank you for your quick answer.

The first player who joins, has the authority to kick and ban other player?
If it's so, i need to connect a dummy player after the server is created, to be safe.

//EDIT: Solved!

27
TNet 3 Support / Old TNet 2.0 Customer question about 3.0
« on: September 06, 2016, 09:49:27 AM »
Hi,

i have only one question at the moment.

Is TNet 3.0 still p2p?

Last time i used TNet 2.0, i made an Unity Scene for the "Dedicated server" and an another Client (Menu) Scene.
On the "Dedicated server" i startup an Gameserver and instantly let an dummy player join to it, to become the host.

Reason:
I plan to make a game with a huge number of players(MMO) with multiple channels.
There will be a huge city, with maybe up to 50-100 players.
The players are able to go to several checkpoints in the city and start their own matches.

28
TNet 3 Support / Re: Gameserver Ping doesnt work?
« on: January 19, 2015, 01:06:29 PM »
Okay sup, thank you.

29
TNet 3 Support / Re: Gameserver Ping doesnt work?
« on: January 19, 2015, 08:01:20 AM »
Thank you for this.

Can you tell me maybe, how to get the Ping from any player?

Should all players send every 5 or 10 seconds, to others players?

I want it, for the ingame TAB information, and for the lobby.

30
TNet 3 Support / Re: Gameserver Ping doesnt work?
« on: January 12, 2015, 10:45:36 AM »
I have the latest version running.

I took your example and try it with this. Same result, no Ping answer:



And yes, i changed the udp port on the local hosted gameserver, too.

Pages: 1 [2] 3 4 ... 6