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

Pages: 1 [2] 3 4 ... 28
TNet 3 Support / Re: broadcastlan tethered device
« on: September 15, 2014, 06:06:58 AM »

I have something like that.
On Mac/Windows/iPhone/Android everything works fine, anyone can be server AND client.

The only thing that's not working is your case. If a device share its connection so that other people connects to it, it does not work.
But I think this particular device can be used as a hotspot for others. So one Android phone will tether its connection, and every other will connect via Wi-Fi to it. The other players will be able to play in LAN mode, but not the Android phone that is tethering. (I think I'm right, but don't remember if it's working like that :D)

TNet 3 Support / Re: Performance
« on: September 15, 2014, 06:04:01 AM »
Separating renderers is a key thing to do

What do you mean by separating renderers? We usually just send position updates, I mean, nothing renderer related.

NGUI 3 Support / Re: Limited support August 28th - September 6th
« on: September 02, 2014, 04:24:17 AM »
Enjoy! I know it is awesome to work on our own projects, but this is also awesome to spend time with our wives because in the end, that's all that matters :)

TNet 3 Support / Re: UDP multicasting
« on: July 17, 2014, 04:11:35 AM »
Ahah sure thing :)

I'll try to reactivate multicasting (much) later to see why it's not working and try to fix it.

TNet 3 Support / Re: UDP multicasting
« on: July 17, 2014, 03:27:35 AM »
I don't have a server, it's a LAN game, so one of the player will start a UDP server from its own machine.

TNet 3 Support / Re: UDP multicasting
« on: July 16, 2014, 01:53:33 PM »
Yes I was using broadcasting before, and UDP broadcasting, server discovery via LAN, broadcast RFC etc... lol
And activating multicasting make everything stopped working, so I deactivated it :)

TNet 3 Support / Re: OnPlayerSync not working?
« on: July 15, 2014, 08:18:49 AM »
Okay, I think I found where the problem is.
Looking at the code, it seems there is a :
  1. else if (target != player)
  1. if (tp != player)

So you're sending SyncPlayerData only to other players :(

But the thing is, I'm using the onPlayerSync callback to update UI with player data, even for myself :/
In the current configuration, if I want to update the UI for myself, I have to add some code, which is not the case for playerRename etc...

Do you think it's something that can be changed in TNet? Or you designed this specifically like that for a very important reason?

TNet 3 Support / Re: OnPlayerSync not working?
« on: July 15, 2014, 08:00:42 AM »
Thx for the latest version, but it does not fix the issue.
After looking at how Packet.RequestSetName and Packet.SyncPlayerData are handled, it seems that in the case of RequestSetName, you also have a ResponseRenamePlayer and not for SyncPlayerData.

Inside TNGameServer.cs, I can see that Packet.RequestSetName will send back the player name in another packet (ResponseRenamePlayer), using :
  1. BinaryWriter writer = BeginSend(Packet.ResponseRenamePlayer);
  2. writer.Write(;
  3. writer.Write(;
  5. if ( != null)
  6. {
  7.    EndSend(true,, null);
  8. }
  9. else
  10. {
  11.    EndSend(true, player);
  12. }

But there is nothing like that for SyncPlayerData.
So I've modified the case Packet.SyncPlayerData by adding at the end:
  1. BinaryWriter writer = BeginSend(Packet.SyncPlayerData);
  2. writer.Write(;
  3. writer.WriteObject(;
  5. if ( != null)
  6. {
  7.    EndSend(true,, null);
  8. }
  9. else
  10. {
  11.    EndSend(true, target);
  12. }

And it's working using that.
Is it a mistake, or something I don't understand?


TNet 3 Support / UDP multicasting
« on: July 15, 2014, 07:29:13 AM »


In release notes for 1.9.6, there is :"TNet will now use UDP multicasting instead of broadcasting by default."

According to the documentation in the code (in TNUdpProtocol, it's better to use multicasting).
Do you suggest using multicasting for LAN games?

TNet 3 Support / OnPlayerSync not working?
« on: July 11, 2014, 10:31:57 AM »

I've just tried to use the TNManager.playerData with DataNode to synchronise some player data. It's perfectly working, but the issue is that in the release notes, you said: "if you wish to be notified, assign a delegate to TManager.client.onPlayerSync: TNManager.client.onPlayerSync += YourListener;"

The thing is that this callback is never sent. I've checked the packages, it's sent (it goes through the send method), but is never received.
Also it's kind of "annoying" to use += etc for this, because all other TNet callbacks are just accessible via simples methods like OnNetworkPlayerRenamed, can't we do that for OnNetworkPlayerSync?


TNet 3 Support / Re: TNet.List
« on: July 07, 2014, 04:40:32 AM »
Yes, yes, but the thing is, I don't want to use TNet.List, but System.Collections.Generic.List, and typing that inside the code is kind of ugly :)

TNet 3 Support / Re: TNet.List
« on: July 06, 2014, 05:31:06 AM »
Hum.... seems like you can't do :
using List = TNet.List

You have to do using List = TNet.List<string> for example.
And what if you have multiple list type? :/

TNet 3 Support / Re: TNet.List
« on: July 06, 2014, 05:24:38 AM »
Ah yes! Forgot about the trick using List = TNet.List; thx!

The difference is that using TNet.List, if you also import System.Collections.Generic, the compiler do not know if you're using TNet.List or System.Collections.Generic.List and send you an error. Using TNetList will not have this.

But I'll use using List = ... :)

TNet 3 Support / Re: TNet.List
« on: July 04, 2014, 11:21:49 AM »
TNet's list is in a namespace, so unless you explicitly state "using TNet" as well as "using System.Collections.Generic", you won't have any ambiguity.

I have this exact problem... I'm using both TNet and System.Collections.Generic, and that's a pain in the ass to add TNet. in front of everything :/
Can't you rename it to BetterList or TNetList ?

I know you'll say no, but we never know :)

NGUI 3 Support / Re: UITable Horizontal?
« on: May 29, 2014, 01:06:41 PM »
Damn you're right!

It would be better in the inspector if we could have an enum with :
- Horizontal
- Vertical
- Custom (specifying the number of column)

No ?

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