o3de-multiplayersample icon indicating copy to clipboard operation
o3de-multiplayersample copied to clipboard

Add controls to prevent clients connecting when game is at max player cap.

Open mcphedar opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. MPS code assumes a max of 10 players (https://github.com/o3de/o3de-multiplayersample/blob/21a495ee57ce2e4322ab11332f1a62fcf089c522/Gem/Code/Source/MultiplayerSampleTypes.h#L101), but more than 10 players can join the game.

These additional players will not see UX updates and will not get correctly synchronized by networking code.

To ensure good performance and to be compatible with the UI, a maximum of 10 players is recommended for the MPS. Beyond this there may be performance issues. The scoring UIs only support 10 players, so additional players won't have a visible score.

Describe the solution you'd like Add a cvar that caps player count in a MPS match 10 or less. Add code that when more players than allowed attempt to connect, players beyond max cap are rejected.

Note: to support more than 10 players, would require both UX and other code work and a lot of testing (will need a different feature request)

mcphedar avatar Apr 12 '23 17:04 mcphedar

UX and game is hardcoded to 10 players (some fixed arrays are set to 10).

Suggestion is to have server check to reject connections when active player count is = 10

MPS should be able to support larger player population (potentially up to 25) but this has not been tested and will require code changes in the client -> server components to increase buffer sizes. https://github.com/o3de/o3de-multiplayersample/blob/21a495ee57ce2e4322ab11332f1a62fcf089c522/Gem/Code/Source/MultiplayerSampleTypes.h#L101

Will need to ensure network buffers can be synchronized before tackling UX expansion work

lmbr-pip avatar Apr 13 '23 17:04 lmbr-pip