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.


Topics - voncarp

Pages: 1 [2]
16
TNet 3 Support / tno.SetOwner
« on: February 21, 2015, 02:55:52 AM »
I am trying to do what you talked about in your last post on this prior thread:

http://www.tasharen.com/forum/index.php?topic=5440.0

But I don't see SetOwner anywhere.  Has this been changed?

17
TNet 3 Support / Unity 4.6.2
« on: February 13, 2015, 01:54:18 AM »
TNET doesn't seem to work with Unity 4.6.2 IL2CPP feature.  It works in the editor, but not on any iOS builds. It doesn't seem to want to connect or host.  Are you familiar with what Unity is trying to do?

In the Unity blog it states, "If your existing project depends on native plugins, you might need to upgrade them to a version that supports 64-bit iOS and IL2CPP."

I am not sure if this applies to TNET.  From what I've read on the blog, its supposed to help with performance.

http://blogs.unity3d.com/2015/01/29/unity-4-6-2-ios-64-bit-support/

As of now, I am back to Unity 4.6.1.

18
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?

19
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;
  8.  
  9.                         mX = rotate.AxisX; //
  10.  
  11.                         h = move.AxisX;
  12.                         v = move.AxisY;
  13.                 //      hc.rotatePublicX = rotate.AxisX;
  14.                         //mouseY = rotate.AxisY;
  15.  
  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);
  19.  
  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. 

 http://youtu.be/m_I5kBjjbzU

Network usage


20
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?

21
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?

Thanks.

22
TNet 3 Support / tnet server crashing
« on: October 25, 2014, 07:57:00 PM »
I have run tnet server with pretty good success on my mac and on a server.  But, recently I can't get it to work on my server, yet it still works on my mac.  The only thing I can think of that is different is that on my server I now have multiple IP addresses.

Thoughts?

Here is a event log

- System

  - Provider

   [ Name]  Windows Error Reporting
 
  - EventID 1001

   [ Qualifiers]  0
 
   Level 4
 
   Task 0
 
   Keywords 0x80000000000000
 
  - TimeCreated

   [ SystemTime]  2014-10-26T00:36:44.000000000Z
 
   EventRecordID 2059
 
   Channel Application
 
   Computer TestServer
 
   Security
 
 - EventData
     
   0
   CLR20r3
   Not available
   0
   tnserver.exe
   0.0.0.0
   542958e0
   System
   2.0.0.0
   53a1215e
   2d68
   8a
   System.Net.Sockets.Socket
   
   AppCrash_tnserver.exe_a485a8ddb813bb31e56341639471b4a9fea32bd7_0957d3e2
   
   0
   265849bc-5ca8-11e4-93fc-80ee73361af2
   2048

23
TNet 3 Support / Performance
« on: August 05, 2014, 01:46:38 PM »
Multiplayer LAN works fairly decent for me as in the following video:

https://www.youtube.com/watch?v=g2_xxMGr1wk

Its a bit jumpy because at the time I made the video, I didn't separate the renderers.  But, everything works pretty smooth.

I tested this on the free Amazon server and everything is choppy, glitchy, and laggy.  I've read on here that the Amazons free version is pretty weak, so I rented a dedicated server from GoDaddy to test and everything is still choppy, glitchy, and laggy.

Is the disparity between LAN and online games really that big?  Could it be that my code is not that well written or is my design of the game poor for there to be such a huge difference?

I use tno.send for everything.   Do I need to switch to tno.sendquickly?

Is there something else I'm missing?  Or is Tnet not made for this type of game?  Its not a high action FPS shooter as you can see in the video everything moves pretty slow. 

Any thoughts would be appreciated.

24
TNet 3 Support / Server
« on: July 27, 2014, 04:34:10 PM »
I've had success getting Tnet and Starlink example scenes to work on an Amazon EC2 instance.  I am struggling to get it work setting up on my on Mac.

I'll run the exe from the terminal:

Quote
For example:
  TNServer -name "My Server" -tcp 5127 -udp 5128 -udpLobby 5129

Local IPs: 0

UPnP discovery failed. TNet won't be able to open ports automatically.
Gateway:  None found

Game server started on port 5127 using protocol version 10
ERROR: Unable to listen to UDP port 5128
Press 'q' followed by ENTER when you want to quit.

I've allowed the ports from my router and firewall.  I am not exactly versed in what this means.  I cant get the example scenes to work as each attempt results in "Connection Refused."  I am thinking the issue is in my setup.

Would you be able to point me in the direction in how I can resolve this?

25
Misc Archive / Game built with NGUI
« on: July 20, 2014, 06:22:53 AM »
I built this iOS game about a year and a half ago using NGUI and HUD text.  An RPG rabbit game.  Released it towards the tail end of last year.

Here was a video from an alpha build: (didn't see any video embed options)

https://www.youtube.com/watch?v=dW_yNwO6CEU

The alpha video displays an ugly UI, only used for developing purposes.

I've redid the UI and text for a more cartoony look as in the following screenshots:









The first pic is the inventory system heavily modified from one of the example scenes from NGUI.  As you can see from the video, I just swapped the text for sprites. The other pics are in game random scenes.  The health bar in the top right was also used exactly from within NGUI.

My next project is going to have pieces of Starlink, NGUI, TNet, and the Multi-Purpose Game Starter Kit.  My lack of networking knowledge is slowing me and I am struggling with TNet, but I hope to have a multiplayer modern apocalyptic iOS shooter.  So far, I got LAN working pretty good and am trying to move forward with hosting and joining a server.

Let me know your thoughts.

26
TNet 3 Support / TNManager.CreateEx TNObject ID
« on: July 03, 2014, 09:44:56 PM »
I have a trigger that spawns random weapons/items.  I use TNManager.CreateEx to spawn the weapons and pass some parameters over to the spawned weapon.  I changed all the TNObject IDs on the weapon so that each weapon has a different ID.  Often it spawns the same item and it says the Network ID is already in use.  I also get error messages stating:

The game object was not found in the TNManager's list of objects. Did you forget to add it?

So I add all these items to the TNManagers list.  But, when I add the items to the TNManager's list it no longer passes the parameters.  Particularly, the Items or Weapons.

This is the code I'm using:
 
  1.         [RCC(12)]
  2.         static GameObject OnCreate (GameObject prefab, Vector3 pos, Quaternion rot, Items unitName)
  3.         {
  4.                 GameObject go = Instantiate(prefab, pos, rot) as GameObject;
  5.                 ItemPickup cat = go.transform.GetChild (0).GetComponent<ItemPickup>();
  6.                 cat._thisItem = unitName;
  7.                 return go;
  8.         }
  9.        
  10.         static public void Create (GameObject prefab, Vector3 pos, Quaternion rot, Items unitName, bool persistent = true)
  11.         {
  12.                 TNManager.CreateEx(12, persistent, prefab, pos, rot, unitName);
  13.         }
  14.        
  15.         [RCC(13)]
  16.         static GameObject OnCreateWeapon (GameObject prefab, Vector3 pos, Quaternion rot, Weapons unitName)
  17.         {
  18.                 GameObject go = Instantiate(prefab, pos, rot) as GameObject;
  19.                 ItemPickup cat = go.transform.GetChild (0).GetComponent<ItemPickup>();
  20.                 cat._thisWeapon = unitName;
  21.                 return go;
  22.         }
  23.        
  24.         static public void CreateWeapon (GameObject prefab, Vector3 pos, Quaternion rot, Weapons unitName, bool persistent = true)
  25.         {
  26.                 TNManager.CreateEx(13, persistent, prefab, pos, rot, unitName);
  27.         }
  28.  
  29.         public void DropItems() {
  30.                 if (weaponsToDrop.Count > 0) {
  31.                         int loop = 0;
  32.                         for (loop = 0; loop < weaponsToDrop.Count; loop++ ) {
  33.                                 temp = (Resources.Load ("DropItems/" + weaponsToDrop[loop].Name)) as GameObject;
  34.                                 CreateWeapon (temp, itemDropTransformLocation.position, itemDropTransformLocation.rotation, weaponsToDrop[loop], false);
  35.                                 temp.rigidbody.AddForce (itemDropTransformLocation.forward * 200);
  36.                                 temp.rigidbody.AddForce (Vector3.up * 200);
  37.                         }
  38.                         weaponsToDrop.Clear ();
  39.                 }
  40.                 if (itemsToDrop.Count > 0) {
  41.                         int loop2 = 0;
  42.                         for (loop2 = 0; loop2 < itemsToDrop.Count; loop2++ ) {
  43.                                 temp = (Resources.Load ("DropItems/" + weaponsToDrop[loop2].Name)) as GameObject;
  44.                                 Create (temp, itemDropTransformLocation.position, itemDropTransformLocation.rotation, itemsToDrop[loop2], false);
  45.                                 temp.rigidbody.AddForce (itemDropTransformLocation.forward * 200);
  46.                                 temp.rigidbody.AddForce (Vector3.up * 200);
  47.                         }
  48.                         itemsToDrop.Clear ();
  49.                 }      
  50.         }

Do you know what I am doing wrong?  I am trying to pass a parameter like I would like instantiating.

Thanks for any assistance.

27
Other Packages / Starlink Tnet Installation Issues
« on: June 14, 2014, 09:59:34 PM »
Following your videos and the instructions within Starlink it seems the installation order is as follows:
1. Starlink
2. NGUI
3. Tnet

I installed all three and removed the example scenes from NGUI and TNet and am getting the following error:

Assets/StarlinkUI/Scripts/Custom/UI/UIServerList.cs(100,42): error CS0117: `Localization' does not contain a definition for `isActive'

Do you know what I am doing wrong?

I updated all three files before installing.

thanks

Pages: 1 [2]