The host changing??
by Mquaker · in Torque Game Engine · 08/23/2006 (12:20 am) · 5 replies
Recently we're developing FPS game
The great issue is 'the host changing'
with the code as given in TNL
we can't service the online game(FPS)
namely not ' join server' method such as day of defeat or call of duty,
but join method by internet connection.
what i want to do, after making a game room, (so I am host, master client, server..)
although I get out of here, a player of other players is to be host.
namely the host changing..
then the game keeps without stopping.
the type of korea fps game with this mothod(the host changing)
is http://specialforce.pmang.com/ , http://suddenattack.co.kr. etc.
Could you give me a sample code that related with 'the host changing?
The great issue is 'the host changing'
with the code as given in TNL
we can't service the online game(FPS)
namely not ' join server' method such as day of defeat or call of duty,
but join method by internet connection.
what i want to do, after making a game room, (so I am host, master client, server..)
although I get out of here, a player of other players is to be host.
namely the host changing..
then the game keeps without stopping.
the type of korea fps game with this mothod(the host changing)
is http://specialforce.pmang.com/ , http://suddenattack.co.kr. etc.
Could you give me a sample code that related with 'the host changing?
About the author
visit : http://www.quakedev.net
#2
Really
I feel so stuffy because of a single host method that can't solve 'the host chaning'.
also this part is still big issue.
uhm...because TGE is a single host method.
So when a host who create server get out of here, other players also dropped.
But when all players have the multi host method on multi game
(when each client is a single host, then the mmo game keeps
namely although a host who role with main server
get out)
although he get out of the game, replaced into other player.
jsut wanna a sample code for mmo game.
Recent is coding into such method.
note
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1046...
this part is a part of basic code.(peerconnection)
of ocurse I was given a help by hime. appreciate it so much.
more...I wanna more detailed code.
08/23/2006 (1:22 am)
Ok..understanding.. Really
I feel so stuffy because of a single host method that can't solve 'the host chaning'.
also this part is still big issue.
uhm...because TGE is a single host method.
So when a host who create server get out of here, other players also dropped.
But when all players have the multi host method on multi game
(when each client is a single host, then the mmo game keeps
namely although a host who role with main server
get out)
although he get out of the game, replaced into other player.
jsut wanna a sample code for mmo game.
Recent is coding into such method.
note
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1046...
this part is a part of basic code.(peerconnection)
of ocurse I was given a help by hime. appreciate it so much.
more...I wanna more detailed code.
#3
Keep a list of clients and prioritize them with numbers together with each IP number. When the host leaves, the highest prioritized client keeps the old state of the game and hosts it, all the other clients join it.
There is no simple "give me the code" here because this is very specialized to your game and I hardly believe someone will come up with some code that will work for all games. The best you can do is head in there and try it.
Creating a 7th thread won't help, either.
08/23/2006 (3:06 am)
You could solve 'host changing' with the present single host method.Keep a list of clients and prioritize them with numbers together with each IP number. When the host leaves, the highest prioritized client keeps the old state of the game and hosts it, all the other clients join it.
There is no simple "give me the code" here because this is very specialized to your game and I hardly believe someone will come up with some code that will work for all games. The best you can do is head in there and try it.
Creating a 7th thread won't help, either.
#4
One approach that might work would be: the connected clients are kept in an ordered list, so that everyone knows who should take over as server should they need to. It would be useful if there was a client setting which opted you out of this list if you couldn't act as server (for example if your firewall allowed no incoming ports). Then, when a server connection dropped, the nominated client would attempt to start up as server, re-spawning the correct mission and all objects as they were to the best of its knowledge. Everyone else would wait perhaps 20 seconds and then try to connect to the new host. If they couldn't, then the 2nd on the list would try to start up as server, etc. As I said, this would be quite a bit of effort.. the re-creation of the mission state would probably be the most work, and probably beyond you if you're a Torque novice. You're not going to get any quick-fix 'code samples' for this, you'd need to program it yourself.
edit: oops, Stefan, didn't see your post. Looks like our advice is identical ;-)
08/23/2006 (3:35 am)
It could certainly be done, but would take quite a bit of work. One approach that might work would be: the connected clients are kept in an ordered list, so that everyone knows who should take over as server should they need to. It would be useful if there was a client setting which opted you out of this list if you couldn't act as server (for example if your firewall allowed no incoming ports). Then, when a server connection dropped, the nominated client would attempt to start up as server, re-spawning the correct mission and all objects as they were to the best of its knowledge. Everyone else would wait perhaps 20 seconds and then try to connect to the new host. If they couldn't, then the 2nd on the list would try to start up as server, etc. As I said, this would be quite a bit of effort.. the re-creation of the mission state would probably be the most work, and probably beyond you if you're a Torque novice. You're not going to get any quick-fix 'code samples' for this, you'd need to program it yourself.
edit: oops, Stefan, didn't see your post. Looks like our advice is identical ;-)
Torque Owner Stefan Lundmark