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 5 6
31
TNet 3 Support / Re: Gameserver Ping doesnt work?
« on: January 05, 2015, 01:12:03 PM »
Yes, but if i try to ping UDP, i get no answer, too.

32
TNet 3 Support / Gameserver Ping doesnt work?
« on: January 05, 2015, 06:13:21 AM »
Hi Aren,

i tried to get an Ping from the Gameserver, but i get no one?

This is my test script:

  1. using UnityEngine;
  2. using System.IO;
  3. using TNet;
  4. using System.Net;
  5.  
  6. public class Test : MonoBehaviour
  7. {
  8.     void Update()
  9.     {
  10.         if (Input.GetKeyDown(KeyCode.P))
  11.         {
  12.             TNManager.Ping(Tools.ResolveEndPoint("127.0.0.1", 6192), OnPing);
  13.         }
  14.     }
  15.  
  16.     void OnPing(IPEndPoint ip, int ms)
  17.     {
  18.         Debug.Log(ms);
  19.     }
  20. }

TCP: 6192
UDP: 6193

I tried both, but with no effect.

33
TNet 3 Support / Re: Gameserver doesnt connect to Lobby Server
« on: January 05, 2015, 06:07:02 AM »
I know i did it, but an TCP Lobby works.

But nevermind, i use the TCP Lobby :)

34
TNet 3 Support / Gameserver doesnt connect to Lobby Server
« on: January 03, 2015, 06:23:44 PM »
Hi,

i have a problem with the newest version.

My Gameserver doesnt connect to the lobby server.
This is my code: http://i.imgur.com/STOsjCe.png

I create a new gameserver, connect to masterserver, start the gameserver and create an channel.

In the old version 1.9.5c, but not now, what should i do, to get it working?

35
TNet 3 Support / Re: Possible to make an Instance with TNet?
« on: August 29, 2014, 05:29:44 AM »
Thank you so much! I will try it :) 

36
TNet 3 Support / Re: Possible to make an Instance with TNet?
« on: August 27, 2014, 05:08:31 AM »
Okay, sorry for the misleading informations.

I want to make the GameServer in Unity, not with your .Net zip file.

I tried to follow the TNManager Process, and what i understood was:
- TNManager creates a new Class Player
- TNManager creates a new Class GameClient
- TNManager.Connect() will set the GameClient Name and Data from the Player Name and Data.
  After that it call's GameClient.Connect() and i will connect to the GameServer trough the TcpProtocol and trough the AsyncResult i got an answer if im connected or not.

And i tried the same in the TNGameServer.cs after Line 900
  1. channel.playerLimit = playerLimit;
  2.  
  3. Player mPlayer = new Player("SERVER");
  4.                         GameClient mClient = new GameClient();
  5.                         mClient.playerName = mPlayer.name;
  6.                         mClient.playerData = mPlayer.data;
  7.                         mClient.Connect(ip, null);

If i undestood TNet correctly, i created with this code an "player", or im wrong?

If you wish, that i stop asking, just say it, i will redesign our game idea. :-\

37
TNet 3 Support / Re: Possible to make an Instance with TNet?
« on: August 26, 2014, 03:55:35 AM »
We plan to make something like World of Warcraft, but in small steps.

We made a game before, it was such like a survival game.
There was a server scene, and when you start the server, it creates a gameserver, create a channel and a server prefab was created with TNManger.Create();
The Prefab had the SQL Connection Data, Config Loader etc..

And we build a authoritative gameserver.

Now i want to make the same but for each channel. And i need your help, how to create automatically an gameclient when a channel will be created.

Edit1:
I tried two different things, one with TcpPlayer

  1.                         IPEndPoint ip = TNet.Tools.ResolveEndPoint("127.0.0.1", 27015);
  2.  
  3.                         TcpPlayer p = new TcpPlayer();
  4.                         Player mPlayer = new Player("SERVER");                
  5.                         p.name = mPlayer.name;
  6.                         p.data = mPlayer.data;
  7.                         p.Connect(ip, null);
  8.                         SendJoinChannel(p, channel);

and one with GameClient

  1.                         Player mPlayer = new Player("SERVER");
  2.                         GameClient mClient = new GameClient();
  3.                         mClient.playerName = mPlayer.name;
  4.                         mClient.playerData = mPlayer.data;
  5.                         mClient.Connect(ip, null);
  6.                         mClient.JoinChannel(channelID, levelName, persist, playerLimit, pass);

With TcpPlayer, a Player is in the Channel but it doesnt respond, so i thought it must connect first, but it wont...
And with the GameClient nothing happens.

I tried this here "case Packet.RequestJoinChannel" on the TNGameServer.cs where the
  1. else if (isNew) {
is.

38
TNet 3 Support / Re: Possible to make an Instance with TNet?
« on: August 26, 2014, 03:45:20 AM »
Thanks for the answer, but you didn't understand what i want to do ^^

We need a authoritative channel, we wont that any player has any control of our game.
And we plan to use a MySQL Database for the inventory, items and so one, but this can be made with Custom packets.

So, and i want to use on the server side things like:

  1. if(TNManager.isHosting)
  2. {
  3. tno.sendquickly("PlayerDie", TNManager.GetPlayer(tno.ownerID);
  4. }
(I wrote this as an example, idk if its correct)

So, the Server says, this player will die and not the player self.

Another example, if i want to loot an item, i want that the server put it in my inventory and send me via tno the item to my inventory, to make this game secure from cheaters.

You understand what i mean? Is it possible to chat with you?

39
TNet 3 Support / Possible to make an Instance with TNet?
« on: August 25, 2014, 02:20:25 AM »
Hi Guys,

i wanted to make a Game with Dungeon Instances.
Now my Question is, can i archieve Instances with T-net?
Should i do it channels?

If yes, i want to make an dedicated Server with Unity Logic.
How can i build in every custom generated channel a player with the hosting tag, automatically?

Edit: I figured out, how to create a Player when a Channel will be created, but now i need to combine this with an Prefab to put some scripts on it.
On the CreateChannel() function in the GameServer.cs just put this line SendJoinChannel(new TcpPlayer(), channel); after channel is created, correct?

Edit2: Ok, if i create as an Player an Channel, im not host anymore, but my autom. generated player doesnt send data.

I put this on my player prefab:
  1.         void Update () {
  2.         if (TNManager.isHosting)
  3.         {
  4.             tno.SendQuickly(22, Target.All);
  5.         }
  6.         }
  7.  
  8.     [RFC(22)]
  9.     void test()
  10.     {
  11.         Debug.Log("Test");
  12.     }

And normaly it should work, but i doenst.

Do you can tell me, how to generate an automatic "Player" to make the channel authoritative?

40
TNet 3 Support / Re: How do you respawn a player?
« on: August 20, 2014, 08:13:25 AM »
You can disable the Player GameObject and reset all variables like health etc. and set the position to your respawn point and enable the player again.
That's how i make it.

41
Mh strange, i send an new mail.

Here is the delivery report:

  1. X-Postfix-Queue-ID: 9BFB03226B2
  2. X-Postfix-Sender: rfc822; drumstein@gentleforge.de
  3. Arrival-Date: Wed, 25 Jun 2014 16:31:02 +0200 (CEST)
  4. Final-Recipient: rfc822; support aat tasharen.com
  5. Original-Recipient: rfc822;support aat tasharen.com
  6. Action: relayed
  7. Status: 2.0.0
  8. Remote-MTA: dns; tasharen.com
  9. Diagnostic-Code: smtp; 250 OK id=1WzoE3-00071L-I2
(I replaced the @)

42
Thank you, i wrote you an email :)

43
The ping is because I never added the handling for it to the UDP lobby server. Open TNUdpLobbyClient.cs, line 121 (inside the 'case' statement of the ProcessPacket function) and add the handling for the Ping packet:
  1. case Packet.RequestPing:
  2. {
  3.         BeginSend(Packet.ResponsePing);
  4.         EndSend(ip);
  5.         break;
  6. }
You mean the TNUdpLobbyServer.cs, right? Because, i cant find any case statement on TNUdpLobbyClient.cs.
And the TNTcpLobbyServer.cs doesnt have this lines, too.

Note that you should also modify the TNGameClient's Ping() function on line 655:
  1.         public void Ping (IPEndPoint udpEndPoint, OnPing callback)
  2.         {
  3.                 onPing = callback;
  4.                 mPingTime = DateTime.Now.Ticks / 10000; // <-- this was missing
  5.                 BeginSend(Packet.RequestPing);
  6.                 EndSend(udpEndPoint);
  7.         }
I added this line, but i dont receive any ping from the external GameServer.

I also active your disabled Packet.ResponsePing Debug Logs, to see if i got an response, but nothing.

44
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.  

45
TNet 3 Support / Re: How much can handly one TNObject?
« on: June 18, 2014, 01:42:28 AM »
Thank you very much, and thank you for the nice update :)

Pages: 1 2 [3] 4 5 6