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 - Bill.Smock

Pages: [1] 2
1
TNet 3 Support / Does host own all objects in scene?
« on: July 20, 2016, 07:49:24 AM »
Couldn't find a 100% clear answer on this using search.  When a new scene is loaded that contains a bunch of TNObjects, is the host automatically the owner of them?

2
Hate to be that guy - but this is all included in the Starlink package.  I'm not saying "oh to get that information you have to pay $45", but it is pretty much already built for you.  Tutorials for it would be nice, though!

3
TNet 3 Support / Re: Channel list name - problem
« on: June 22, 2016, 09:19:04 PM »
Set the data when the channel is created:

  1.     void OnJoinChannel(int channelID, bool success, string msg)
  2.     {
  3.         if (!TNManager.isHosting)
  4.             return;
  5.  
  6.         TNManager.SetChannelData("ChannelName", "name of channel");
  7.     }
  8.  

Then, when you populate your table, get the data:

  1.     void Start()
  2.     {
  3.         TNManager.GetChannelList(OnListRefresh);
  4.     }
  5.  
  6.     void OnListRefresh(TNList<Channel.Info> list)
  7. {
  8.    // use list[index].data.GetChild<string>("ChannelName");
  9. }
  10.  

4
TNet 3 Support / TNObject no parent found?
« on: June 22, 2016, 09:07:55 PM »
I have a prefab with TNObject script on it, the ID is set to 0.  When I instantiate the object, no parent is found in the TNObject Start() function (transform.parent = null).  Not sure what to do, it's on the top of the hierarchy on the prefab. 

One thing to note - I am instantiating the object after a new scene loads in the Start() routine of an object that is already in the scene.  Could this be causing it?  If so, how??

5
TNet 3 Support / Re: How should I create a child with a TNet RCC?
« on: June 20, 2016, 08:22:32 AM »
Okay looks as though they do allow it, just needed to add an item on my security group. What port does tnet use to send udp packets?

I can use any number I like for listening, right? (0-60000)

6
TNet 3 Support / Re: Amazon EC2 Setup
« on: June 19, 2016, 03:51:14 PM »
Hah nice thread revival.  Second the thanks - that site is in my bookmarks.  +1 for him mentioning elastic IPs.

7
TNet 3 Support / Re: How should I create a child with a TNet RCC?
« on: June 19, 2016, 08:09:15 AM »
My bad on the forum, wasn't sure where to post it.  This is working fine. 

Random question - in a thread from I think December 2015, you mentioned amazon EC2 doesn't allow UDP sending.  Is this still the case?  If SendQuickly can't send UDP does it default to TCP?  I looked through the source code and couldn't find this anywhere.  Thanks!

8
TNet 3 Support / How should I create a child with a TNet RCC?
« on: June 16, 2016, 07:41:15 PM »
I can send position information and the other information as parameters, but I'm wondering if there is a preferred method?  Thank you

9
Responding to this ridiculous post to pay it forward for the people who have helped me (CW and Aren).  Can't answer everything though...

Quote
I think this would allow me to deal with AI-driven avatars as well, but my question is, where do I put that logic, as tnetserver does not seem to simulate a world?
Do I run a unity client in a VM with some kind of account with special permissions on tnet?
Run AI logic on the channel host's client.  This includes spawning things that you only want spawned once.
  1. if(TNManager.isHosting) // AI logic

Quote
How does the lobby work?
The server's lobby keeps a list of available server instances.  You open a server instance and connect to the lobby server simultaneously.
  1.         /// <summary>
  2.         /// Start a local game server and connect to a remote lobby server.
  3.         /// </summary>
  4.  
  5.         static public bool Start (int tcpPort, int udpPort, string fileName, Type type, IPEndPoint remoteLobby, bool openPort = true)

To make a list available to clients, you will have to build a lobby UI that keeps track of the available server instances.  Based on this post, you may as well buy the Starlink package.  It has everything you need to get a lobby up and running relatively quickly.  I purchased it and it's working out well for me.

Quote
Can it redirect to another IP?
The lobby can contain multiple server 'buttons' that allow you to connect to the server of your choice.

Quote
Can the lobby server instruct the client whom to connect to next already, or do I have to write additional classes for tnet server to deal with routing?
AFAIK you will have to keep track of whatever metrics determine which server is next to allow players, and then you would have to send a function to the clients that tells them which IP to connect to when they're ready to connect. (assuming you don't have a server buttons lobby).

Quote
To keep with the idea of server authority, I'll be writing the input scripts separately from the scripts actually pulling the strings inside the spawned avatar, syncing input frequently -- but what is the best practice to sync the avatar's state? Do I sync the character controller somehow? The animator? The 'shadow spine' should be enough for player controlled characters in first person along with syncing some animation booleans of which state they're in (such as reloading a weapon); but there's also a dead state where the player is a disembodied camera that can wander for a while before respawning, leaving the avatar behind as a ragdoll.  At a high level, what are the tnet functions I'd be doing for handling player characters like this?
Go through all of the source code of the included tutorials.  Multiple times if you have to.  Everything you need to know for these questions is available in the examples.


Quote
What about entering a vehicle? What's the best practice to reparent a player avatar as a child of the vehicle? With unet this proved extremely hard because initially I had it set up so players and vehicles both had networkidentities.
Add TNObject script to any objects you want to play with over the network.  Remote function calls and remote creation calls will probably be enough to get this done.

Quote
I haven't yet started the conversion over to TNET3 so I'm trying to figure out the recommended way to do things before diving in and wasting a whole bunch of time spinning my wheels.
Connect to a LAN server.  Connect to a remove server.  Create a server instance with a PC.  Now that you know how to do those... Each server instance can contain any number of channels.  Channels can be created within the instance on the fly.  In order to create a new channel, the client must already be connected to a server instance.  Each channel has a host (TNManager.isHosting) and that's how you decide who runs AI.  Go through the examples 100x so you completely understand RFCs and RCCs in this system.  They are amazingly simple once you understand them. 

Quote
The channel system seems like it will work pretty well for my large terrain, splitting areas of concern up and allowing the use of multiple scenes in unity (since punching a hole in a terrain's so hard, I made a crummy model of an railway entrance with a barred gate, jiggling the lock will trigger the scene+channel change, I imagine) but I'm not exactly understanding a good strategy towards growing even bigger. As players do their thing, resources will spawn, things will be crafted, and lots and lots of data has to be stored.
Two questions to ask yourself:  "Do I want the data stored locally on their PC or the server?" and "Why not try looking into datanodes?"


This post really looks like you're getting baked out of your mind, coming up with a thousand ideas at once, and then praying that there's a solution out there that will take care of all this shit at once.  You need to write a design document and stick to it.  This is insanity. 

10
TNet 3 Support / Re: SetHost() switches to their server instance?
« on: June 12, 2016, 06:07:04 AM »
You either need to be inside the channel to access this data, or you need to retrieve it by doing a TNManager.GetChannelList(). Setting the channel data can only be done from within the channel.

Access through the Channel.Info data node instead of GetChannelData. Need to keep in mind that your Starlink setup for everything is how it's supposed to be done.  Thank you!!

11
TNet 3 Support / Re: SetHost() switches to their server instance?
« on: June 11, 2016, 06:50:18 PM »
Between your help, and ArenMook's and Starlink, I'm making a lot of progress.  In fact, the only problem I am having right now is GetChannelData is not working.  I am calling it from a player who is not in any channel, but is connected to the same remote server.  Is the no channel bit the problem?  I'm using TNManager.GetChannelData<string>(id, "CurrentLevel");  Pretty straight forward.  I've testing the SetChannelData using logger and get data on the host while host is in channel, but from outside of the channel I cannot seem to access it.  :-(

12
TNet 3 Support / Re: SetHost() switches to their server instance?
« on: June 11, 2016, 07:18:16 AM »
Actually, I'll just use EC2 as a dedicated server for hosting all channels.  Why bother with P2P right now when I have probably 2 years of development to go?  When I have 500,000 players connecting on my incredible game that blows everything else away, I'll worry about P2P.  /s  ;D

13
TNet 3 Support / SetHost() switches to their server instance?
« on: June 09, 2016, 07:04:35 PM »
So when I use sethost to switch the channel host, will their server instance be the 'host' of the channel then?  This will be for whenever a player drops out of a lobby or in game.  Thanks!


edit for another question - I am having trouble setting up a server/channel list the way so that each list item contains data from the server's channel (each server will have only one channel, always).  I would like clients to be able to view the channel data without having to join that server instance - similar to any game that shows rows with descriptions including # of players, player limit, etc.  Very typical in multiplayer games.  However, I cannot find a way to refresh this information without the client being connected to the server in which the channels reside.  How can I do this?  Do I need to save the channel info and associated servers to a file on the lobby server (EC2) and then create the channel items list using that information? 

14
Other Packages / Re: UI Starter Kit: Starlink (NGUI + TNet)
« on: June 07, 2016, 08:17:04 PM »
My internet lobby list is including the main TNet Server instance that is running on EC2.  Should I simply exclude this by name or is there another way you would recommend?  (this lobby was set up as detailed on pages 5-6).  Amazing how easy it is, considering I have no experience with any of this and it took all of 2.5 hours. 



edit:  thanks for updating to TNet3 :)

15
NGUI 3 Support / UIPopupList value always null
« on: June 06, 2016, 05:50:49 PM »
I read through the class and it seems that anything that sets 'value' is now replaced because of UILabel > SetCurrentSelection.  Well, that means I need to use List.GetComponentInChildren<UILabel>().text to have the current selection.  Was this the intended setup? 

Pages: [1] 2