Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: Wonse on September 02, 2013, 08:01:10 AM
-
HI
I4m working on a game. and i want to be sure, some script are working safely on the server side, always online.
how can i do this with TNET ? my player can join and leave, easily the server, so i dont think i can let a player be the host, for this
-
You need to host online, such as amazon EC2, Azure or leaseweb etc for the server if you do not want the authoritative player (isHosting) to close the server.
-
You need to host online, such as amazon EC2, Azure or leaseweb etc for the server if you do not want the authoritative player (isHosting) to close the server.
i have the tnetserver.exe on my server, but, even with this, a player is "isHosting" right ?
-
If you have the .exe on your own server and isHosting player disconnects, then another player will be assigned the new host (and will return true for isHosting) and gameplay will continue without a break.
In your code, all clients will have the same code but the client who is the group leader (who returns isHosting == true) will be doing the NPC ai etc.
-
If you have the .exe on your own server and isHosting player disconnects, then another player will be assigned the new host (and will return true for isHosting) and gameplay will continue without a break.
In your code, all clients will have the same code but the client who is the group leader (who returns isHosting == true) will be doing the NPC ai etc.
but, i have to deal withj all my functions to be able to be "breaked" and passed to another player, so ?
for my pokker table, (5-10 players), if the isHosting player is leaving, another will be host, and reset the current game ?
-
I'm going to change the term "host" to something in the next version because people keep confusing the terms "host" and "server".
Server: physical program that players connect to. Each server is capable of supporting thousands of players, and thousands of separate channels / games. If the server goes down, everyone gets disconnected.
Host: authoritative player. Each channel only has one host. If the host player leaves, another player in the channel becomes the next host and the gameplay continues as if nothing happened.
-
so, if i dont want my pokker game to be breaked is the authoritative player leave, what can i do ?
-
Just disconnect everyone then. You get notified when players leave, and if that player was the host, leave as well.