Often I see that one team* in PVP lobby** has several rank 28 veterans while the other has only 10- rank newbies. And you can guess how it usually ends. (And this happens again and again while people are not leaving the lobby)


Also if 3 people leave one team after the game the other team stays intact, so there are teams of 6 and 3 (but 9 total people in the lobby can be rearranged into two teams of 5 and 4 and the next game can start sooner).


I belive PvP deserves a better (complex) matchmaking algorithm in general. Still there is a cheap and simple way to at least balance opposing teams in the lobby in some way.


Probably there should be some PvP rank for each player that is to be used for balancing, but let's just use Veteran Rank for a start (it's simple and always available as you show it for each player in the lobby)


Algorithm in a breif: auto rebalancing on every change happened in lobby (joined/left player), keeping pre-made groups*** together (maybe giving them additional ranking), putting every next available highest rank player to the currently weakest team.


The same idea in a simplified example: Have you played some team sports in school? Two team captains (that are chosen by a trainer) chose players from the class turn by turn, always trying to get the most skillfull guy from the remaining, so at the end the teams are more or less equal. This can be done authomatically to define our teams from the list of all players joined a lobby


Wrote some simple code in pseudo-Scala (something similar to F#). It's not too far from modern C# and there is nothing tricky, so any developer will read it fluently


For some reason wasn't able to attach it as a plain .txt so attaching it as .zip: PVP team balancing code.zip


Also added some comments there so the algorithm can be understood by people with no special skills


There are futher (more complex and expensive) improvements for matchmaking that are possible. But let's keep them behind this topic for now


*team - loyalists/chaos

**lobby - up to 12 people (in two teams) waiting for the same PvP game

***group - pre-made group of up to 3 people joined together