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

Pages: 1 [2]
16
Hi,

i have a new problem.
I set up a own pooling system for game, and im trying to Create on the Hosting side the objects. (with TNManager.Create...)
In this sample i have 9k trees, we plan more trees in the future.

And if i start my server, i got this error Objects that are not instantiated via TNManager.Create must have a non-zero ID.
I can't look into the Unity window, if the trees got an ID or not, because the Unity Editor is hanging and i cant press anything on it.

Sometimes it works, sometimes not. Why? Is there any solution to solve this problem?

And i have issues with TNManager.Ping, it doesnt give me an feedback.

My code looks like this:

  1. TNManager.Ping(data.ServerEntry.externalAddress, GotPing);
  2.  
  3. private void GotPing(IPEndPoint ip, int milliSeconds)
  4. {
  5.     Debug.Log("ms" + milliSeconds);
  6.     Latency.Text = milliSeconds + " ms";
  7. }
  8.  

17
TNet 3 Support / How much can handly one TNObject?
« on: June 16, 2014, 10:18:43 AM »
Hey Aren,

is it correct, that a TNObject can handle 255 RFC's?
Or can TNet handly generaly only 255 RFC's?

We have atm one script called RFCConstants, there are all RCF, for the whole game.
Now i found a thread, where you said, we can use 255 RFC's on one TNObject, right?

//EDIT:
I have a second question, is it possible to send an RFC over gameobjects?
Or can i only call an RFC and retrieve it on the same script?

18
TNet 3 Support / Ping listed gameserver on Serverbrowser
« on: May 31, 2014, 05:49:08 AM »
Hey,

how is it possible to ping a remote gameserver, thats listed on my serverbrowser?
Im not connected on any server.

19
TNet 3 Support / Failed to convert parameters
« on: May 19, 2014, 02:19:51 PM »
Im trying to find this error since three days, but i cant.. :'(
Im very frustrated...

  1. failed to convert parameters
  2.   at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00063] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:192
  3.   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115
  4.   at TNet.UnityTools.ExecuteAll (TNet.List`1 rfcs, Byte funcID, System.Object[] parameters) [0x0006f] in D:\Unity_Projects\Project_Repo\Assets\Extern\TNet\Client\TNUnityTools.cs:113
  5.  
  6. UnityEngine.Debug:LogError(Object)
  7. TNet.UnityTools:PrintException(Exception, CachedFunc, Object[]) (at Assets/Extern/TNet/Client/TNUnityTools.cs:41)
  8. TNet.UnityTools:ExecuteAll(List`1, Byte, Object[]) (at Assets/Extern/TNet/Client/TNUnityTools.cs:120)
  9. TNObject:Execute(Byte, Object[]) (at Assets/Extern/TNet/Client/TNObject.cs:320)
  10. TNObject:Start() (at Assets/Extern/TNet/Client/TNObject.cs:267)

Can you give me some tips, how to find the error?
It happens only, if a player is ingame, and i try to join with the Unity Editor.

Two builded players can join, but i think they get the same error, but i can't see any errors ingame.

20
TNet 3 Support / Several questions about TNAutoSync
« on: May 12, 2014, 03:27:09 PM »
I have a few questions about the TNAutoSync.
- Can we use it for a final game, or only for developing?
- What can be synched with it, only Transform or Rigidbody's?

21
TNet 3 Support / Send CustomPackets to LobbyServer
« on: April 24, 2014, 03:49:50 PM »
How can i send CustomPackets to my LobbyServer?

i tried it, but it doesnt work.

Thats how i try it:

TNGameServer.cs:
  1.     string remoteAddress = "censored";
  2.     int remotePort = 25565;
  3.     TcpProtocol mTcp = new TcpProtocol();
  4.     IPEndPoint mRemoteAddress;
  5. .
  6. .
  7. .
  8. case Packet.RequestPlayerEmail:
  9.             {
  10.                 string playerEmail = reader.ReadString();
  11.  
  12.                 mRemoteAddress = Tools.ResolveEndPoint(remoteAddress, remotePort);
  13.                 mTcp.Connect(mRemoteAddress);
  14.                 mTcp.BeginSend(Packet.RequestPlayerID).Write(playerEmail);
  15.                 mTcp.EndSend();
  16.                 break;
  17.             }
  18. .
  19. .
  20. .
  21.  

And here the Visual Studio Solution without UnityEngine (like your TNserver.zip):

TNTcpLobbyServer.cs
  1. bool ProcessPacket (Buffer buffer, TcpProtocol tc)
  2.         {
  3. .
  4. .
  5. .
  6.             case Packet.RequestPlayerID:
  7.             {
  8.                 string email = reader.ReadString();
  9.  
  10.                
  11.                 mRemoteAddress = Tools.ResolveEndPoint("theGameServerIP", 6192);
  12.                 tc.Connect(mRemoteAddress);
  13.                 tc.BeginSend(Packet.ResponsePlayerID).Write("1");
  14.                 tc.EndSend();  
  15.  
  16.                 break;
  17.             }
  18. .
  19. .
  20. .
  21.  

TNPackets are on both Projects the same. I dont know what i can make better...

22
TNet 3 Support / Massive Lag problems
« on: April 08, 2014, 02:28:55 AM »
I have a huge problem with the Sync of an Rigidbody.
I made everything like you said, but i cant get smooth sync.

My player prefab looks like this

  1. Rigidbody, TNObject, sync script
  2. - Collider 1
  3. - Renderer
  4.  

I tried it out with Interpolation = Laggy result (If i collide with a player, it takes around 1-3sec then we collide)
I tried to send the Players KeyStroke to the host and the host sends it back to all player = The players on Host side, works smooth, but on the client side im lagging, because i get my own keystrokes after a few seconds back.

Im at work right now, but i later i will post my interpolation script here, so maybe i made something wrong :(

23
TNet 3 Support / Exception has been thrown by the target of an invocation.
« on: February 21, 2014, 01:43:51 PM »
Hey,

i got a error when i try make smth. in the Notifications.

  1.    
  2.    /// <summary>
  3.    /// We leave the current room
  4.    /// </summary>
  5.    void OnNetworkJoinChannel(bool success, string message)
  6.    {
  7.        if(success==false)
  8.            TNManager.JoinRandomChannel("Level", false, 8, "");
  9.        Debug.Log("OnNetworkJoinChannel: " + message);
  10.  
  11.        chatScript.addGameChatMessage(playerName + " joined the game");
  12.    }

And in my FPSChat.cs
  1.     //Add game messages etc
  2.     public void addGameChatMessage(string str){
  3.         Debug.Log("AddgameChatMessage");
  4.             ApplyGlobalChatText("", str);
  5.             if(TNManager.isInChannel){
  6.                     tno.Send("ApplyGlobalChatText", Target.Others, "", str);   
  7.             }  
  8.     }

And an another question, how can i send an Audio RFC?
I got an Error, that TN can't send's AudioClips.

24
TNet 3 Support / HowTo setUp AI on a authoritative server?
« on: February 20, 2014, 02:31:53 AM »
Hey guys,

i have a question about a authoritative server.
Whats the best way to import a AI on the server? I know that Aren says, to make physical things on server is stupid.
Can someone give me maybe an other solution?

25
TNet 3 Support / Custom Server/Channel Creator
« on: February 13, 2014, 11:59:16 AM »
Hi,

im about to think to write a ChannelCreator in C# (not in Unity, in Visual Studio).
But i can't find any function, how to create a Channel.

Why im planing to do this, is to create a standalone server to sync my weather/day and night cycle.
And i planed to write a ban/kick function and combine it with a global ban system with the externel TNet Gameserver.

Is there any possibility?

(Or is it only possible through Unity?)

26
TNet 3 Support / Start.UDP needs an open Port?
« on: February 04, 2014, 03:14:21 AM »
Do i need to open a Port for Start.UDP on my dedicated Server?
Or is it running on the client?

27
TNet 3 Support / HowTo Setup dedicated Gameserver?
« on: February 01, 2014, 02:44:34 PM »
Hello,

i want to setup some fixed dedicated Gameserver. Should i setup a lobby and register gameserver to it, and after i did this, i can see the server in my serverlist?
Or should register channels in the gameserver? If its so, how can i setup fixed channels?

//EDIT: Ok, i got how to setup fixed channels.

Here a small snippet, i hope it's ok.

  1. using UnityEngine;
  2. using System.Collections;
  3. using System;
  4. using TNet;
  5.  
  6. public class CreateFixedChannel : MonoBehaviour {
  7.  
  8.         // Use this for initialization
  9.         void Start () {
  10.         TNManager.Connect("YOUR IP", YOUR PORT);
  11.         }
  12.  
  13.     private string channelname ="";
  14.     private string channelmaxplayer = "8";
  15.     private string channelpw = "";
  16.  
  17.     void OnGUI()
  18.     {
  19.         if (TNManager.isConnected)
  20.         {
  21.             GUI.Label(new Rect(20, 20, 100, 50), "Channelname:");
  22.             channelname = GUI.TextField(new Rect(120, 20, 200, 20),channelname);
  23.  
  24.             GUI.Label(new Rect(20, 50, 100, 50), "Max Player:");
  25.             channelmaxplayer = GUI.TextField(new Rect(120, 50, 200, 20), channelmaxplayer);
  26.  
  27.             GUI.Label(new Rect(20, 80, 100, 50), "Passwort:");
  28.             channelpw = GUI.TextField(new Rect(120, 80, 200, 20), channelpw);
  29.  
  30.  
  31.             if (GUILayout.Button("Create Channel"))
  32.             {
  33.                 TNManager.CreateChannel(channelname, true, Convert.ToInt32(channelmaxplayer), channelpw);
  34.                
  35.             }
  36.         }
  37.     }
  38. }
  39.  


28
TNet 3 Support / Difference between TCPLobby and UDPLobby?
« on: January 28, 2014, 07:30:33 AM »
What is the difference between TCPLobby TCP GameServer and UDPLobby UDP GameServer?

29
TNet 3 Support / Any Tutorial to SetUp a Game with Channels?
« on: January 19, 2014, 01:12:26 PM »
Hey,

im trying since yesterday to setup TNet, but i dont know... I think im stupid.

So some questions now, maybe you can bring clarity.

If i want to setup a dedicated lobby server, i need to start it as tcpLobby and a tcp gameserver?
And if im connected to the gameserver, i can start creating Channels or join them?

If i create a Channel, how can i instantiate a player prefab?
Whats better to sync player? AutoSync or RFC Commands?

Yeah, if there would be a tutorial for a Channel based game, it would be nice, would be easier to understand TNet.

Pages: 1 [2]