Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#655 closed defect (fixed)

Game setup: Player assignment not updated when switching map

Reported by: fabio Owned by: historic_bruno
Priority: Should Have Milestone: Alpha 3
Component: Core engine Keywords:
Cc: Patch:

Description

  • Select Single Player -> Acropolis Map -> Use Player 4
  • Select a map with < 4 players, e.g. Arcadia II: there is no "You" player assigned
  • Start game -> lots of error

In my opinion when moving to a different map "You" should always be assigned to "Player 1"

Change History (8)

comment:1 by historic_bruno, 14 years ago

Owner: set to historic_bruno
Status: newassigned
Summary: Player selection problem leads to errorsGame setup: Player assignment not updated when switching map

comment:2 by historic_bruno, 14 years ago

I see the problem, the player assignment in single player mode is only set one time, when the setup menu is opened. It doesn't get changed when the map switches. Maybe that should happen when the number of players on a new map selection is less than the current player assignment. Or we can always have it reset to slot 1.

comment:3 by historic_bruno, 14 years ago

Ok this bug even exists on multiplayer mode. So here's how I think to fix this. In single player mode, changing the map will reset You to Player 1. In multiplayer mode, changing the map will "unassign" players who are in invalid slots (greater than the number of players for the current scenario).

A related issue for multiplayer games, is that the host needs a better way to deal with unassigned players, like disconnecting/ejecting them before the game starts.

comment:4 by ben, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [8534]) Fix player assignments on map change (number of players may decrease, knocking assigned players out of a slot). Fixes #655

comment:5 by fabio, 14 years ago

It seems this is still happening with multiplayer games.

comment:6 by historic_bruno, 14 years ago

Fabio, do you mean there are errors when starting a multiplayer game (after changing the map as described above)? Or that player assignments are not updated properly?

(There's a separate issue in multiplayer games, where unassigned players get included in the game anyway, but they have no camera, entities, etc., and the engine doesn't like that)

comment:7 by fabio, 14 years ago

I mean that in multiplayer mode (host game) selecting "Player 4" in a map with 4 players and then selecting a map with only two player, player is no longer assigned. Pressing start gives many error. It's the same problem originally reported here, but only for multiplayer maps.

comment:8 by historic_bruno, 13 years ago

The multiplayer setup and engine just need to be "smarter" to handle all those cases. Say there are 5 networked players, but you change the map to a 4 player map. Well, someone gets left out, but as the game is now, they will still be included in the game, only it breaks things.

The host should always be assigned, but does that mean we should knock another player out of their slot to assign the host? We could force the host to be assigned to slot 1 when the map changes, but what if the host is in slot 2 in a 4 player map and wouldn't be affected? Or we could not begin the game until the host is assigned. And how do we handle other players who are unassigned?

There's currently no way to "disconnect" players who are unassigned before the game starts.

Note: See TracTickets for help on using tickets.