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

Party system, team matchmaking #423

Merged
merged 23 commits into from
Nov 26, 2020

Conversation

Geosearchef
Copy link
Member

@Geosearchef Geosearchef commented Mar 29, 2019

Add party system.

TODO:

  • Remove invalid_state messages? These states are internal things and violations should probably generate ClientErrors instead (i.e. if a player tries to join a queue while they are still in a game, the client should be able to catch this and prevent it)
  • Rename all queue or queue_name fields to the same thing (pick one for consistency)
  • Clean up player state enum

Closes #613
Closes #632
Closes #679

@Sheeo
Copy link
Member

Sheeo commented Mar 29, 2019

Please use the new draft pull request feature for WIP PR's

Copy link
Member

@Sheeo Sheeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice initial work, you're doing well 👍

Left generic comments on the code. Seems like what's missing for full functionality is party matchmaking and game launching + any rating/scoring changes required?

server/game_service.py Outdated Show resolved Hide resolved
server/team_matchmaker/player_party.py Outdated Show resolved Hide resolved
server/players.py Outdated Show resolved Hide resolved
server/team_matchmaker/player_party.py Outdated Show resolved Hide resolved
server/team_matchmaker/player_party.py Outdated Show resolved Hide resolved
server/team_matchmaking_service.py Outdated Show resolved Hide resolved
server/lobbyconnection.py Outdated Show resolved Hide resolved
server/team_matchmaking_service.py Outdated Show resolved Hide resolved
server/team_matchmaking_service.py Outdated Show resolved Hide resolved
server/team_matchmaking_service.py Outdated Show resolved Hide resolved
@Sheeo
Copy link
Member

Sheeo commented Mar 29, 2019

Tracking issue #19

@Rackover
Copy link
Member


I'm leaving this heart here because while I can't review this PR at the moment, I want to let you know how thankful I am for all the amazing work you're doing

@Geosearchef
Copy link
Member Author

Scoring/rating is intended to apply to the normal global rating as the intention of this was to get people out of playing single maps and make them try other maps out of a map people while reducing the lobby sim aspect.

Copy link
Collaborator

@Askaholic Askaholic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't quite get through everything, will take a look at it this evening.

server/__init__.py Outdated Show resolved Hide resolved
server/game_service.py Outdated Show resolved Hide resolved
server/lobbyconnection.py Outdated Show resolved Hide resolved
server/lobbyconnection.py Outdated Show resolved Hide resolved
server/team_matchmaker/player_party.py Outdated Show resolved Hide resolved
@Geosearchef Geosearchef force-pushed the feature/#422-implement-party-system-matchmaking branch from c6c74af to d2230d1 Compare March 29, 2019 20:44
@Geosearchef Geosearchef force-pushed the feature/#422-implement-party-system-matchmaking branch 2 times, most recently from 3cba3b6 to fab2d70 Compare March 29, 2019 22:40

pending_invite.party.add_player(recipient)

self.remove_disbanded_parties()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do disbanded parties have to be checked here? Shouldn't they be checked here:

if pending_invite.party not in self.player_parties:
    self.remove_disbanded_parties()
    raise ClientError("The party you're trying to join doesn't exist anymore.", recoverable=True)

@Askaholic
Copy link
Collaborator

OK. Finished reading through it. Over all it's very clean nice job!

One other thing that occurred to be because of something Downlord mentioned, was that we should maybe think about how the clients could localize our server messages. So everywhere we have something like:

raise ClientError("The invited player doesn't exist", recoverable=True)

Maybe we want to be sending some localizable error code instead? Just a thought.

@Askaholic Askaholic force-pushed the feature/#422-implement-party-system-matchmaking branch 3 times, most recently from b1d18c3 to df0704c Compare May 2, 2019 03:42
Using indices into a boolean array was confusing as it was non obvious what
each index represented. This lead to some immediate implementation mistakes
where the server implementation assumed that the indices mapped to their one
indexed lua counterparts, while the client implementation assumed that the
factions were sorted alphabetically from left to right. This new approach is
less error prone, requires fewer bytes to transfer the same information, and
is more flexible-- even allowing the selection of nomads or other future
faction for special game modes.
As searches can only be started by party owners, the guests may not have
decided what factions they want to pick when the owner enters them into the
matchmaker queue. Therefore we should allow them to change their faction
preferences up until the moment they are matched.

Fixes #679
@Askaholic Askaholic force-pushed the feature/#422-implement-party-system-matchmaking branch 2 times, most recently from 287154d to 966e8cd Compare November 14, 2020 22:32
@Askaholic Askaholic force-pushed the feature/#422-implement-party-system-matchmaking branch from 966e8cd to f27bba6 Compare November 23, 2020 23:56
@Askaholic Askaholic changed the title [WIP] Party system, team matchmaking Party system, team matchmaking Nov 26, 2020
@Askaholic Askaholic merged commit f3edcc7 into develop Nov 26, 2020
@Askaholic Askaholic linked an issue Dec 22, 2020 that may be closed by this pull request
@Askaholic Askaholic deleted the feature/#422-implement-party-system-matchmaking branch August 1, 2021 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants