Author Topic: TNet Questions?  (Read 2010 times)

kuroato

  • Guest
TNet Questions?
« on: November 25, 2013, 06:01:36 AM »
Hello, I am new to TNet. It was recommended to me over another Multiplayer Asset I was using called MultiOnline.

Now I understand TNet allows us to Host a Game without Requiring to Configure a Firewall, but what I'm confused about is why can't you Host a Game from the Unity Webplayer? as seen here: http://www.tasharen.com/tnet/

Whats the point of a Webplayer Client with Option to Host Game if it doesn't Work? So am I limited to ONLY Hosting a Game on my Local PC, but then other Players can Join via IP using Unity Webplayer Client and or PC Client?

Regarding your Lobby Server, do I need to Setup a Dedicated Server for this, I assume so? If so what are the Requirements, I could not find it on Documentation Page. Can I host this Lobby Server on Linux or PC? I guess it's just a Single Scene with Lobby Server Script right, and I just need to Build it into an Executable with the Lobby Server Script in it and Run it on my Dedicated Server, and Point my Clients to it?

Circling back to the Hosting of a Game....  So lets say I wanted my Players to Host a Game from the Unity Webplayer Client, but they are Connecting to the Lobby Server to tell it there is a Game being Hosted for other Players to See. Now if I have a Lobby Server Setup, can Players Host Games from the Webplayer, or Only Players on Local PC can Host Games No Matter if there is a Lobby Server or Not?

I'm just trying to Understand the whole Hosting Option Fully, because I would like my Players to be able to Host a Game from their Web Browser and Not from Local PC. Does TNet have a way to Support Players Hosting Games in their Web Browser all?

Final Question, How is TNet better than Photon Networking?  Right now for me, if I am not able to Host a Game from Unity Webplayer using TNet as per your Demo, and Only from Local. I don't really see the Point in going with TNet because it feels very Limited Hosting wise. A Good Networking Solution should be able to Host from any Platform, and it seems that's not the case for TNet, but I do hope im work.





 


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNet Questions?
« Reply #1 on: November 25, 2013, 08:02:53 PM »
Creating servers in the webplayer is not possible simply because Unity doesn't allow servers to be created in the web player due to security reasons.

If it was possible, one could easily create some code that listens for private network traffic and forwards it off-site, which would be a major breach of security for government agencies.

Setting up a lobby server is explained in the FAQ -- http://www.tasharen.com/forum/index.php?topic=6538.0

In Photon you either use a cloud (which basically means you're always playing on a remote server), or you host a remote server just like with TNet. You can't create a server from within your game.

In TNet, if your remote lobby server is not just a lobby server (but is also a game server), then you can connect to it from the web player and have players create their own games easily. They will be hosting games, but they will not be the server (and all traffic will be going through the remote server, not through the player-hosted server instance). It's only the latter that's not possible on the web player.

So again, hosting a game isn't the same as being the server. Hosting simply means "the creator of a game on a remote server", while serving means "the program everyone connects to".
« Last Edit: November 26, 2013, 04:11:55 AM by ArenMook »

kuroato

  • Guest
Re: TNet Questions?
« Reply #2 on: November 25, 2013, 08:29:15 PM »
Interesting OK Thanks alot! I appreciate your time to explain all this. Makes more sense now. = )