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 ... 3 4 [5] 6 7
TNet 3 Support / Instantiating objects on LevelLoad
« on: January 14, 2015, 08:53:16 AM »
When a client joins all the objects are instantiated that were created in the game he is joining.

Where do I need to look if I don't want that?

If the objects have rigidbodies and I have several streaming maps.  By the time a player gets over to a different section of the map the rigidbody has already fallen out of range.  This leads to one character able to see and grab the object and the other player can't.

Where are these objects saved so I can grab them and stop them from falling?  Can I stop TNManager from creating objects on the client until I request it to?

TNet 3 Support / Re: TNet: Lag Emulation, Kicks and Bans
« on: January 14, 2015, 01:18:25 AM »
Where is the RFC being sent from?  Are you streaming the map in?

I have a huge map with tons of objects too and encountered this issue a number of times early in my project.  You probably want to make that call after the object is instantiated.

If your streaming with Unity Pro send the RFC after AsyncOperation.isDone or if you have another streaming solution your likely going to need some type of event or isFinishedLoading bool before you start sending the RFC.

Another possible solution depends on your setup is to have the object in scene already and just take the network view. That way its already there and you don't have to wait for anything to load.

In-game UI: uGUI HUD, Scoreboard, etc.
NetworkManagement "Super" GameObject: This handles server and client code. This is TNObject #1

Those look like they could always be in scene.  Just take ownership of it.

If (tno.isMine) 

TNet 3 Support / Re: TNet: Lag Emulation, Kicks and Bans
« on: January 13, 2015, 02:46:46 AM »
Hrm, it seems TNManager.isLoadingLevel doesn't exist.

You could try TNManager.isJoiningChannel.

TNet 3 Support / Re: Load balancing concept.
« on: January 11, 2015, 05:59:40 AM »
I have Bolt too.  I also have fholm's Mecanim Network Example which no longer exists one month after purchasing it.  He also made a FPS networking kit which no longer exists.  Both of those assets were paid assets.

The best thing about Tasharen's product is the long shelf life and prompt responses.  I've been using NGUI for almost 3 years and arenmook still answers my questions.

I second this though: AOI/network LOD.

I have a streaming open world game and that functionality would be very useful.   I do agree with chilly in some aspects, even though Tnet is relatively inexpensive and its super easy to use, the more features the better.

TNet 3 Support / Re: Tno.SendQuickly
« on: December 02, 2014, 04:16:31 PM »
I found the solution in my case.  For it to work properly as it was before, I had to remove StartUDP().  Specifically, I removed StartUDP(5128).  I used this because on my server, I only opened port 5128 for UDP.

It works now and the host moves properly and smooth on all devices, but this issue likely is case specific.  I am certain everyone sets up their games differently.

For the record; however, I am still using tno.sendquickly.  And if switch to using tno.send it goes back to being choppy.  Why tno.sendquickly shows better performance, I'm not certain.  Like I mentioned before, in all my network usage tests, they never show any working remote UDP address or bytes received.

Additionally, I haven't been testing on LAN.  I've only been testing with an outside server.

TNet 3 Support / Re: Tno.SendQuickly
« on: November 30, 2014, 03:14:04 PM »
Yes.  But my game only works on iOS devices running around 30 FPS.  That's not too bad is it?  Framerates on iOS devices are capped at 60.

All of the movements of the clients work perfectly using tno.sendquickly.  They move and sync on all devices.  Its just the host who doesn't move on any device except his own.  And this is only after the most recent update. On the client devices on the video on my prior post, it seems he only moves based on the updates of tnsyncrigidbody.

From what I've read, if there is no UPD then everything gets sent by TCP.  On all my network usage tests, there is never a remote UDP address and there are no in Bytes from UDP.  I don't think I have been successful establishing any UDP connections.  So, if there is no UDP shouldn't tno.sendquickly work exactly like tno.send?

When I use tno.send the host and clients all move and sync properly.  Its just choppy.  Thats why I have been using tno.sendquickly.

  1.         IEnumerator MyNetworkUpdate()
  2.         {
  3.                 for (;;) {
  4.                         yield return new WaitForSeconds (0.2f);
  5.                         if (tno.isMine) {
  6.                                 hc.rotatePublicY = rotate.AxisY;
  8.                                 mX = rotate.AxisX;
  10.                                 h = move.AxisX;
  11.                                 v = move.AxisY;
  13.                                 tno.SendQuickly (9, Target.All, v, mX, h, grounded);
  14.                         }
  15.                 }
  16.         }

I did attempt your suggestion, but the problem still exists using tno.sendquickly.  It just seems odd.  Maybe what I was doing wasn't right, but worked.  And whatever you updated, made what I was doing obsolete.  Perhaps, I'm going to have to redo my controller.

Beforehand, do you have any other suggestions?


Curiously, I use the multipurpose starter kit with tnet integration for my starting point.  I've updated tnet several times over it.  I noticed the starter kit hasn't been updated in 18 mos.  Do you think there may be any potential conflict because it hasn't been updated in awhile?

TNet 3 Support / Tno.SendQuickly
« on: November 27, 2014, 10:05:41 PM »
After updating Tnet I am having some issues.  Before I used Tno.SendQuickly for my mecanim movement controls and had no issues.  I haven't changed any code since I updated.  The clients that log in move fine and have no problems.  However, the host seems to have movement issues. 

  1.         void Update () {
  2.                 if (!tno.isMine)
  3.                         return;
  4.                         //hc.movePublicX = move.AxisX;
  5.                         //hc.movePublicY = move.AxisY;
  6.                         //hc.rotatePublicX = rotate.AxisX;
  7.                         hc.rotatePublicY = rotate.AxisY;
  9.                         mX = rotate.AxisX; //
  11.                         h = move.AxisX;
  12.                         v = move.AxisY;
  13.                 //      hc.rotatePublicX = rotate.AxisX;
  14.                         //mouseY = rotate.AxisY;
  16.                         //tno.SendQuickly ("UpdateMouseY", Target.AllSaved, mouseY);
  17.                         //tno.SendQuickly ("SetMecanimState", Target.All, v, mX, h, grounded);
  18.                 tno.SendQuickly (9, Target.All, v, mX, h, grounded);
  20.         }

I use the above code to control my character.  The host struggles to move on any of the clients after the update.  On the device of the host, the character moves fine.  However, on the clients he doesnt move at all.  It seems he only moves based on the updates of tnsyncrigidbody.

If I change the above code to tno.send everything moves, but extremely choppy.  Thats one of the reason I use tno.SendQuickly.  Tno.send was choppy even before the update.

Was there anything in this recent update that affected tno.send and tno.sendquickly?  I am hoping to resolve this issue, but I am not certain where to start since there no errors show up.

Any thoughts at all? 

I attached a video of my issue.

Network usage

TNet 3 Support / Re: Change Persistent
« on: November 27, 2014, 04:59:20 AM »
TNManager.Destroy was what I was looking for. Thanks.

TNet 3 Support / Re: Updated: TNET RFC Error
« on: November 26, 2014, 12:32:07 PM »
I have had something similar to this when I instantiate my player.  Particular, when I modeled it after the Multipurpose add on demo.  Happens at the very beginning right?  And then stops after your player is instantiated?

Chances are you got a null somewhere when trying to call that RFC.  Try throwing in some debugs in Idler and where your calling Idler checking your components and variables.

TNet 3 Support / Change Persistent
« on: November 25, 2014, 01:20:53 PM »
How do I change the persistent flag after it has been set?

I have a player hit a trigger and spawn in some enemies.  The player dies so I don't want the enemy to disappear so I have the persistent flag set to true.

However, if I have the player kill the enemies I destroy the enemy.  Then I have another player connect and automatically he gets disconnected and I get:

[TNet] Trying to execute RFC #33 on TNObject #2752505 before it has been created.

I suspect the player trying to connect is getting booted because of that error.

However, before I am booted I can see the enemies in the hierarchy in the editor.  So, even though they were destroyed by the initial player.  They are still around.  How do I clear them out?

Additionally, often when I disconnect and then attempt to log back in my player seems to want to spawn back where he initially left even though I have persistent set to false.

I spawn in my character with this:

  1.         IEnumerator SpawnPlayer() {
  2.                 while (TNManager.isJoiningChannel) yield return null;
  3.                 TNManager.Create(player, spawnSpot.position, spawnSpot.rotation, false);
  4.                 _playerTransform = player.transform;
  5.         }

Again, thoughts on how I can l clear these out?

TNet 3 Support / Delay Objects Loading
« on: November 14, 2014, 07:46:40 PM »
I have a pretty good size map that takes a second or two to load up.  When I join a game as a client, I'll have objects already in scene from the host that are searching for some objects that haven't been loaded yet, leading to some nulls.

Is there a way to delay loading the persistent items until requested?


Separating the renderer from the rigidbody works wonders.  I've had some success with this.

After importing the base model with renderers you often see the animator attached to the root gameobject.  What I initially did was add my controls and rigidbody/character controller to this root object.  But, to have it run much smoother during online play you want to add another parent gameobject to the original imported model.  Add your controls and rigidbody/controller to the parent object above the animator/original imported model.

So, what happens is that you move the rigidbody and the child object which should be your model with renderers follows the rigidbody resulting in smoother movement.  The jittery movement that you initially saw still exists, but its now in the root rigidbody/controller which you shouldn't see.

TNet 3 Support / Re: tnet server crashing
« on: October 27, 2014, 02:42:22 AM »
Ah.  That did stop it from crashing.

Any suggestions what I need to check next?  Before I had multiple IPs, everything worked fine and UPnP did its job.  Now, no Gateway IP and UPnP fails. 

I do notice -ip use for either address still only offers the second IP address for the External IP.

Would you have any more suggestions?

TNet 3 Support / Re: tnet server crashing
« on: October 26, 2014, 10:26:58 PM »
Any of this relevant?

System.Net.Sockets.Socket.SetSocketOption (optionLevel=System.Net.Sockets.SocketOptionLevel.IP, optionName=System.Net.Sockets.SocketOptionName.AddMembership, optionValue={System.Net.Sockets.MulticastOption}) in C:\cygwin\sources\mono\mcs\class\System\System.Net.Sockets\Socket.cs:2076
TNet.UdpProtocol.Start (port=5129) in
TNet.UdpLobbyServer.Start (listenPort=5129) in
ServerMain.Start (name="TNet Server", tcpPort=5127, udpPort=5128, lobbyAddress=(null), lobbyPort=5129, useTcp=false) in
ServerMain.Main (args={string[7]}) in



TNet 3 Support / Re: tnet server crashing
« on: October 26, 2014, 08:17:13 PM »
I just run it.  Have any thoughts on how I can provide more info related to the crash?

I have run it on this server before when I had one IP address.  I reset/reprovision the server and re-uploaded the unzipped files.  I unzipped the files and run the .exe.  And now it crashes as in the picture every time I attempt to open it.  Windows server 2012. The only difference I can think of between my initial settings of what I originally had and currently have is that I have more than one IP address for the server.

I can run it on my Mac no problem. 


Pages: 1 ... 3 4 [5] 6 7