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

Pages: [1] 2
1
TNet 3 Support / Re: RequestChannelList broken in version 1.6.5
« on: March 25, 2013, 03:25:52 AM »
@danreid70, There is a tutorial here. http://www.tasharen.com/forum/index.php?topic=3512.0  Cheers!  Kris

2
TNet 3 Support / Re: Creating a Channel List Tutorial
« on: March 25, 2013, 03:22:46 AM »
Hey Sunriser!  I finally got around to downloading & testing your example.  Fantastic job!!!  Your code is very readable and simple in design.
If you don't have NGUI you can still benefit from downloading the example and scanning through the C# code.  Awesome job! - Kris

3
TNet 3 Support / Re: How to get a channel list
« on: February 21, 2013, 07:16:54 AM »
@ArenMook:  I did get the channels working finally.  Solution: When I imported TNet into a new project and ran it, started the server, attempt to connect to a channel (which would attempt to load Example1 scene) it would disconnect.  Well it turns out you MUST add all the Example scenes to the Build Settings > Scenes in Build list in order for the scene to load and NOT get disconnected.  I guess it couldn't load the scene and would disconnect.  Anyways, it's working now and I'm happy.  Thanks!!!  Also, an example of the lobby would be great!

4
TNet 3 Support / Re: Confused by channels
« on: February 17, 2013, 07:44:59 PM »
@Suvu: I did some additional research this morning and noted that the channel list is, in fact, stored in the TNGameServer class.

Also, I have re-worked the examples that come with TNet to use channels.  If you want I can post the code.  Just let me know if you want it.

Cheers! - Kris

5
TNet 3 Support / Re: Confused by channels
« on: February 16, 2013, 12:24:57 PM »
Hey Sevu, the first client that hosts the game can call TNManager.JoinChannel() and specify the level to load for all other clients to load when they join (they can leave the level parameter a blank string, "").

See this thread for more details.

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

Cheers! - Kris


6
TNet 3 Support / Re: How to get a channel list
« on: February 15, 2013, 05:55:29 PM »
@ArenMook:  But I do have OnChannelList defined in my main class which has all the other code in it (which I copied from the mainMenu example).  My OnChannelList is copied exactly as it is from this forum page (see below).  I've literally copied all three pieces from this forum page and I'm still having the two issues (both Packet and OnChannelList are shown in MonoDevelop as "Unknown" and OnChannelList never gets called).

  1. void OnChannelList (Packet response, BinaryReader reader, IPEndPoint source)
  2. {
  3.         int count = reader.ReadInt32();
  4.        
  5.         for (int i = 0; i < count; ++i)
  6.         {
  7.                 int channelID           = reader.ReadInt32();
  8.                 int playerCount         = reader.ReadInt32();
  9.                 bool password           = reader.ReadBoolean();
  10.                 bool isPersistent       = reader.ReadBoolean();
  11.                 string scene            = reader.ReadString();
  12.                
  13.                 // Do something with this information -- add it to a list perhaps? Whatever you need.
  14.         }
  15. }
  16.  

Also, can you also answer my first question?

I get this error message in the Mono debugger when I hover over "Packet" in the first line of code below.  Global::TNet.Packet Unknown member Packet.

  1. TNManager.client.BeginSend(Packet.RequestChannelList);
  2. TNManager.client.EndSend();
  3.  

Thanks, Kris

7
TNet 3 Support / Re: How to get a channel list
« on: February 15, 2013, 08:12:11 AM »
@ArenMook: OK, help me out here please.  What am I doing wrong?  To begin with I start the server and then create a channel on the server (computer #1 ).  I can compile the code below without any errors.  However, after connecting from computer #2, when I put a break point on the first line below and run it I get this error message in the Mono debugger when I hover over "Packet" in the first line of code below.  Global::TNet.Packet Unknown member Packet.

  1. TNManager.client.BeginSend(Packet.RequestChannelList);
  2. TNManager.client.EndSend();
  3.  

And in my Start() method I get this error when I hover over the "OnChannelList" code.  Unknown Identifier: OnChannelList

  1. TNManager.client.packetHandlers[(byte)Packet.ResponseChannelList] = OnChannelList;
  2.  

I did a search through all the .cs files that come with TNet and the text "OnChannelList" is not found in any of them.  I have the version from the Unity Asset store which is Version 1.3.1.

I'm sure I'm missing something simple but I'm not understanding why it compiles yet I get these errors when I hover over the code. Needless to say the callback method OnChannelList never gets triggered on the client.

Thanks, Kris

8
TNet 3 Support / Re: Auth Server with Multiple rooms
« on: February 14, 2013, 09:57:19 PM »
@ArenMook:  No worries.  I'm planning on implementing these changes in the next week for my own project.  How about I send you my code when I've got it working, you can review it and possibly add it into the TNet library?

Cheers! - Kris

9
TNet 3 Support / Re: Auth Server with Multiple rooms
« on: February 14, 2013, 04:07:41 PM »
@ArenMook: Sounds good.  I'll create a new MonoBehavour class, maybe say "TNGameManager", and basically copy the contents of TNManager and remove the single instance code which will allow me to create multiple (a List) of the new "TNGameManager" class. This will allow me to create to add a new TNGameManager object for each game the auth. server creates/hosts.

You know, this may be something a lot of other developers out there will want to use (hint, hint  ;)).  Is this something you may want to consider adding to the TNet library?

Cheers! - Kris

10
TNet 3 Support / Re: Auth Server with Multiple rooms
« on: February 13, 2013, 03:54:59 PM »
ArenMook: Interesting idea but I'd rather do what sunriser is considering (previous post).

Quote
Is it possible to do this instancing of TNManager with the current version of TNet (with a small example of how to in code)?

So is it possible to create multiple instances of TNManager?

Thanks, Kris

11
Hey Sunriser, question for you.  How did you get the client and the server to load different scenes?  It was my understanding that when you call JoinChannel() with the scene name it basically forces any clients that join to load the same scene.  Did you override this?  If so how?  Can you post a code example on how you did this?

Thanks! - Kris

12
TNet 3 Support / Re: Issue with isThisMyObject
« on: February 12, 2013, 09:44:06 PM »
@ArenMook: Oh!  Does that mean some kind of automated port forwarding via NAT?  That would be slick!  I'm assuming the link below covers what you are working on?

http://en.wikipedia.org/wiki/Internet_Gateway_Device_Protocol

Thanks! - Kris

13
TNet 3 Support / Re: Auth Server with Multiple rooms
« on: February 12, 2013, 08:38:54 PM »
Hey sunriser!  What you have described is EXACTLY what I am trying to implement for my own game!  Maybe we can exchange ideas and code samples to help each other get it working.  Or perhaps post code here for everyone to benefit from.

From what I've read and understand TNManager "handles" all loaded channels/rooms.  So if you are loading the same scene in different channels I believe the single instance of TNManager can appropriately route the packets to the different channels/rooms.

Did you see my other thread with a question on stripping out the assets (graphics, sounds, and animations) from the server's version of each scene in order to keep memory demands lower on the server?

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

I am also very interested in ArenMook's reply on this topic.  Cheers! - Kris

14
TNet 3 Support / Auth Server and skeleton scenes/levels
« on: February 11, 2013, 06:39:20 PM »
Hi again, I am attempting to build an authentication server and client.  I want to create a scene/level for the server that does NOT have all the heavy graphics and sounds and animations that the client scene needs (keeping the GameObjects).  Can I take the client scene and strip out all the graphics, sounds, and animations and use it on the server so that when the server does a JoinChannel(,seneName) it will load the stripped down scene?  I want to keep the server as lightweight as possible as I want to be able to run as many games (channels) as possible without running out of memory.  Also, do TNet channels "share" scene assets (graphics, sounds, and animations) in order to keep memory requirements down?  Thanks!

15
TNet 3 Support / Re: Issue with isThisMyObject
« on: February 11, 2013, 05:13:12 PM »
Great! When will the next version be available?  Thanks!

Pages: [1] 2