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

Allocate players to teams depending on ranking. #37

Closed
rubenwardy opened this issue Jan 1, 2016 · 8 comments
Closed

Allocate players to teams depending on ranking. #37

rubenwardy opened this issue Jan 1, 2016 · 8 comments

Comments

@rubenwardy
Copy link
Member

  • Sort online player by rank.
  • Some sort of random swapping/player trading?
@AKryukov92
Copy link
Contributor

I think player allocation to team is coded in core ctf_pvp_engine in function https://github.com/rubenwardy/ctf_pvp_engine/blob/e2a59cef6eba80464af5414d89c4e1c6fbfd597c/ctf/teams.lua#L264

@rubenwardy
Copy link
Member Author

For new matches, the place to modify is where it calls autoalloc either in ctf_map or ctf_match, I forgot. The list of players should be sorted based on ranking, then slightly randomised some how

@AKryukov92
Copy link
Contributor

The list of players should be sorted based on ranking, then slightly randomised some how

I don't think this is that easy, because players are able to join and to leave team in the middle of the fight. For such players it is better to allocate them to team with minimal total score of its members. In case of huge difference between scores of different players, we can use logarithm of score.

@ClobberXD
Copy link
Contributor

ClobberXD commented Mar 12, 2018

I don't think this is that easy, because players are able to join and to leave team in the middle of the fight.

I don't think that matters - I propose to save the names of the allocated players to a 'list' at the start of a new match, which is preserved for the whole duration of the match, so if they try to intentionally switch teams in the middle of a match, they'll be automatically assigned to the same team they left (as their name is still present in the list).

If any new players join, they'll be allocated to the team with a lower cumulative score, and their names added to the aforementioned 'list'.

@AKryukov92
Copy link
Contributor

If any new players join, they'll be allocated to the team with a lower cumulative score, and their names added to the aforementioned 'list'.

It can possibly lead to abuse:

  • Pro player A joins to game first time in the match and gets allocated to Red because this team is weaker.
  • Pro player A logs off. Red team has lower cumulative score again
  • Pro player B, friend of A, joins to game first time and gets allocated to Red team again.
  • Pro player A logs in and gets returned to red team because he was saved in this team list

@rubenwardy rubenwardy moved this from Short Term to Now / Urgent in V2 Road Map [deprecated] Mar 22, 2018
rubenwardy added a commit that referenced this issue Apr 6, 2018
Will probably be shit. See #37
@ClobberXD
Copy link
Contributor

@rubenwardy Re-open please! :)

@rubenwardy
Copy link
Member Author

This has been implemented

@ClobberXD
Copy link
Contributor

But we've already discussed that it doesn't work; unless you've had another go at modifying the code...

@rubenwardy rubenwardy removed this from Now / Urgent in V2 Road Map [deprecated] Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants