Opened 7 years ago

#4462 new defect

Gamesetup - synchronize the list of loaded mods and available maps

Reported by: elexis Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Network Keywords:
Cc: Patch:

Description

Issues:

  • The clients don't know which mods are loaded, thus producing errors that don't contain that piece of information.
  • The clients don't know which maps exist, so the host can select a non-existing map or picking a "random" map that does that.
  • If a client joins a running game with a map that isn't found locally, it will crash instead of graceful exit (#3554).

Implementation:

  • Adding a new network message NMT_MOD_INFO would allow the clients to communicate which mods they loaded and which maps exist, potentially adding further metrics in the future. (This information shouldn't be transported in the gamesetup message, as that should only contain simulation relevant data.)
  • The handshake process must be changed as well, so that clients don't open the gamesetup or session page before having received the mod info (There needs to be a new client state).
  • Unless the loaded mods can be changed in the gamesetup (likely won't), clients should refuse to connect to the server if they have a different set of mods loaded.
  • However if the client doesn't have the map that the host had selected, the client should still be able to join the game and see a "map not found" notification instead of a map title / preview, so that he/she can still join the server and argue for a map change. Upon selection of an uncommon map, there should also be a notification to all clients that some player doesn't have that map.
  • Since the server now knows all maps of all clients, the "Start Game" button can become disabled if the selected map isn't available to every player.
  • Observers can be ignored (clients should exit gracefully from both gamesetup and session if the host starts a game with a map from the gamesetup that wasn't foudn).
  • The "map selection" dropdown could still show all available maps (so that the host doesn't wonder why his custom map isn't selectable), but grayed out in the dropown to indicate that it can't be played with the current players.
  • The "random map" option should select a map that is available to all players.

Change History (0)

Note: See TracTickets for help on using tickets.