Kruptein / PlanarAlly

A companion tool for when you travel into the planes.
https://www.planarally.io/
MIT License
402 stars 73 forks source link

[FEAT] assign random colours to players instaed of using default colour #760

Open dthv opened 3 years ago

dthv commented 3 years ago

Some tools (e.g. Ruler, Ping) use player-specific colours to ease distinction between the users. I'd expect the rectangles created with #759 to also share these colours.

Yet, there's a default colour that has to be changed before this distinction works.

It would be nice if any player joining a campaign were assigned a randomised colour (still subject to change, if so wished) that is distinct from the colours of other players.

Bonus, if the distinction check involves "visual distance" from colours of other players.

Kruptein commented 3 years ago

The one problem here is that existing colour choices (e.g. ruler, ping) are determined by your settings in a specific order:

  1. If no campaign-specific colour is configured, use the player's global colour choice
  2. Otherwise use the campaign-specific colour choice.

We could, set the global colour choice to a random colour on account creation (and maybe retroactively change existing player colours if they're the default plain black), but we won't be able to have the visual distance logic here, because there is no correlation to other players at this point.

dthv commented 3 years ago

I'd say: Do both? Randomize player colour on account creation. On joining of a campaign, check "distance" of player's choice to other colours used and if too close, set a new random campaign-specific choice. The latter could (should?) be configurable in player's settings.

Kruptein commented 3 years ago

Randomizing both results in the global one actually not being useful though. I could just remove that I guess.

Kruptein commented 3 years ago

Another slight issue is that currently you get assigned your colour upon joining the session for the first time, which means that the visual colour distinction cannot be determined unless all players have joined, but at that time all previous players already have their colour

dthv commented 3 years ago

I might be too pragmatic here, but I'd say: first come, first served.

Take players A, B, and C who are (randomly) assigned the colours red, green, and blue, respectively on account creation. Player B loves the colour red so they manually assign red as their (global) colour.

Now, A starts a campaign and invites B and C. On join of B, PA notices that B uses the same colour as A (better: A colour that is within the "distance range" of A's colour) and sets a random colour as campaign specific choice for B, leaving their global settings untouched. Thus, B gets green.

I'll admit that this will get complicated if B is assigned blue in this case, resulting in C also getting assigned a new random campaign setting.

So this might be a bit out of scope, i.e. too much work for such a non-critical issue.

Yet, random global colour on account creation would be a nice feat. And the other thing might be just covered in a DM-setting "randomise player colours" or something, setting a quick hack when needed, leaving the rest to the players to sort out their preferred settings.

Kruptein commented 3 years ago

Fair enough, I think the visual distant concept is cool in theory, but in practice a bit too confusing or at least for now. I think the latter proposal you made can be a good start.

dthv commented 3 years ago

On a second thought: Maybe the client setting could use a "show others" button, opening a pop-up with the colours of other players in the campaign so players can set up distinguishable colours easy on their own?