Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send game options in game_launch message for matchmaker games #824

Closed
Askaholic opened this issue Aug 28, 2021 · 1 comment · Fixed by #825
Closed

Send game options in game_launch message for matchmaker games #824

Askaholic opened this issue Aug 28, 2021 · 1 comment · Fixed by #825
Assignees

Comments

@Askaholic
Copy link
Collaborator

As we expand the capabilities of the team matchmaker we will need the ability to configure game options from the server. For example in larger matchmaker games (3v3, 4v4+) we may want to disable fullshare (which is currently hardcoded to always be enabled because we wanted it for 2v2).

We should add a new game launch option called game_options that is a dictionary mapping option names to values. For example:

{
    "command": "game_launch",
    "game_options": {
        "Share": "FullShare",
        "Victory": "demoralization"
    },
    ...
}

Ideally we would pull these from the queue definition in the database, but for now it might be OK to hardcode them in based on team size.

The game launch options are defined here:

server/server/types.py

Lines 22 to 30 in 716717f

class GameLaunchOptions(NamedTuple):
"""Additional options used to configure the FA lobby"""
mapname: Optional[str] = None
team: Optional[int] = None
faction: Optional[int] = None
expected_players: Optional[int] = None
map_position: Optional[int] = None

And they are set here:
options = GameLaunchOptions(
mapname=mapname,
expected_players=len(all_players),
)

@Askaholic Askaholic added this to To do in Team Matchmaker via automation Aug 28, 2021
@BlackYps
Copy link
Collaborator

Hardcoding them based on team size is not a good option, because we probably want to have two different 4v4 queues, one with fullshare and one without.

@Askaholic Askaholic self-assigned this Sep 17, 2021
Team Matchmaker automation moved this from To do to Done Sep 26, 2021
Askaholic added a commit that referenced this issue Sep 26, 2021
* Refactor tests

* Use JSON type for params

* Load queue params from database

* Send game options in game_launch message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants