Page 1 of 1

Rejoining mid-game

Posted: 27 May 2010, 01:05
by ultrasonicsite
If for some reason someone crashes, and their name is on the list of people who were in the game, they should be able to rejoin to spectate. Can it be done?

Re: Rejoining mid-game

Posted: 27 May 2010, 01:07
by aegis
theoretically, yes! and if you search the forums, you'll find multiple discussions about the topic from the past.

Re: Rejoining mid-game

Posted: 27 May 2010, 02:55
by Forboding Angel
Probably not gonna happen.

Re: Rejoining mid-game

Posted: 27 May 2010, 03:00
by momfreeek
what, him searching the forums?

Re: Rejoining mid-game

Posted: 27 May 2010, 04:47
by Forboding Angel
momfreeek wrote:what, him searching the forums?
Post Subject wrote:Rejoining mid-game

Re: Rejoining mid-game

Posted: 27 May 2010, 18:43
by zerver
Yes, it is possible, there is an "AllowAdditionalPlayers" setting to enable this on the server.

Re: Rejoining mid-game

Posted: 29 May 2010, 10:24
by Hobo Joe
zerver wrote:Yes, it is possible, there is an "AllowAdditionalPlayers" setting to enable this on the server.
Why is this not the common setting?

Re: Rejoining mid-game

Posted: 29 May 2010, 10:43
by aegis
does it synchronize state, or do they have a very broken view of the game once they join? ;)

Re: Rejoining mid-game

Posted: 29 May 2010, 17:01
by zerver
Hobo Joe wrote:Why is this not the common setting?
I was actually going to ask the same thing. Maybe devs were afraid this would increase risk of mid-game server crashes by malformed connection attempts or spoofing etc.

In addition to this, anyone who knows the server address can join to spectate at any time. The spectator count may grow large...

I think everything works wrt sync. What happens is that the game restarts and essentially fast forwards to the point where it is currently at. If a player rejoins though, he will probably only be able to spectate.

So, question is if we should enable it by default. Someone post a vote...

Re: Rejoining mid-game

Posted: 29 May 2010, 17:31
by Tribulex
!vote 1

Re: Rejoining mid-game

Posted: 29 May 2010, 18:27
by Hobo Joe
zerver wrote: In addition to this, anyone who knows the server address can join to spectate at any time. The spectator count may grow large...

Elaborate

Re: Rejoining mid-game

Posted: 30 May 2010, 01:56
by Pressure Line
Hobo Joe wrote:
zerver wrote: In addition to this, anyone who knows the server address can join to spectate at any time. The spectator count may grow large...

Elaborate
What zerver means is that since anyone who knows the server address can join there is potential for a game to start with 2 specs, and end up with 20 halfway through the game.

Re: Rejoining mid-game

Posted: 30 May 2010, 02:25
by Pxtl
Holy crap, we have this feature? Unfortunately, since it's implemented as a fast-forward instead of a true state transfer, it means it's not viable for some deathmatch-esque game in which a single gamestate could last for hours as players come and go...

But still, how much power do modders have over the handling of late-joiners. Can the mod assign them to play?

Re: Rejoining mid-game

Posted: 30 May 2010, 05:06
by jK
zerver wrote:I think everything works wrt sync. What happens is that the game restarts and essentially fast forwards to the point where it is currently at. If a player rejoins though, he will probably only be able to spectate.
IIRC Auswaschbar said that the packet buffer is limited, so this just works for the first ~30seconds.

(I never investigated that code myself, but it is what I thought and heard about it)

Re: Rejoining mid-game

Posted: 30 May 2010, 10:15
by aegis
but the packet buffer is theoretically unlimited as long as we're still saving replays

Re: Rejoining mid-game

Posted: 31 May 2010, 19:32
by zerver

Code: Select all

 std::list< boost::shared_ptr<const netcode::RawPacket> > packetCache; //waaa, the overhead
not limited, but clearly needs optimization...

Anyway, I will probably change it so that "AllowAdditionalPlayers" only controls whether extra spectators are allowed after start and the reconnect-to-spectate-if-crashed feature is allowed by default.

Re: Rejoining mid-game

Posted: 02 Jun 2010, 06:38
by bobthedinosaur
what about just join midgame, and no re about it?