Page 1 of 1

reattributeColorsBasedOnPreferences with lots of players

Posted: 04 April 2021, 06:20
by Idsky
If I call reattributeColorsBasedOnPreferences with 16 players, when BGA premium only has 12 colour options, what happens?

I do not want to use black and white so my game only supports 10 of the standard colour options plus 6 extra ones (there are no board counters so it doesn't really matter if players can differentiate them all).

Ideally the API would give the premium players their colour choices and then give out any remaining colours to the remaining players.
If more than 10 players were premium I would hope it would do something like giving 'purple' to one player who wanted purple and 'lavender' (close enough!) to another player that wanted purple, etc. But the doc doesn't say anything about this situation.

Re: reattributeColorsBasedOnPreferences with lots of players

Posted: 04 April 2021, 16:44
by Benoit314
You do not have to implement the exact colours from the framework.
When assigning colours to players, it uses some sort of colour distance to choose the colour. So if I set blue as my favourite colour, I could get assigned a colour close to blue, could be a different shade of blue.
I suppose there is some kind of threshold to determine when a colour is not blue anymore, don't know the value.

Maybe 2 close purples could be assigned to different players with purple as a preferred colour. You can do some checks in studio, all accounts are "premium".

One last thing: the framework will only darken the background for the exact yellow and exact white provided.