Opened 9 years ago

Closed 17 months ago

Last modified 17 months ago

#3506 closed enhancement (fixed)

Add new colors to gamesetup

Reported by: Stan Owned by: trompetin17
Priority: Nice to Have Milestone: Alpha 27
Component: UI – Game setup Keywords: simple
Cc: Patch:

Description (last modified by Stan)

Currently the only colors available are loaded from player_defaults.jsonDue to this, you can really add new ones, because for instance the game doesn't support 9 players.

We could either split this file to extract the colors, or modify the parser to allow more players to be parsed.

We could use something like this to generate different colors

http://gamedev.stackexchange.com/questions/46463/how-can-i-find-an-optimum-set-of-colors-for-10-players

Change History (8)

comment:1 by elexis, 9 years ago

Component: Core engineUI & Simulation
Keywords: simple added

Refs #1580

Notice the color changer automatically replaces wrong colors with the most similar one that is valid.

So it shouldn't be a problem if player_defaults.json have slightly different colors as the ones you want to make selectable, since many skirmish/scenario maps already come with invalid colors. The color changer also takes care of duplicate colors.

One problem I see with that is having multiple colors that have the same common name. When the green player attacks you, you might want to shout "light green attacking me" into the chat, but what if there are two light green players? I know, you can lookup the playername by clicking onto a unit or opening the diplomacy manager, but that takes time and it would be nice to have the colors distinct enough that they stay a unique identifier.

Last edited 9 years ago by elexis (previous) (diff)

comment:2 by Stan, 9 years ago

I didn't know that. Well we might want to unify the code so that there is not like a hundred places that affects colors.

I agree with you on the second point though. I was trying to find colors that would be different from the one we currently have.

comment:3 by Imarok, 8 years ago

which code parts affect player colors? (Am I understanding it right, changing colors in player_defaults.json is not enough?)

Last edited 8 years ago by Imarok (previous) (diff)

comment:4 by Imarok, 5 years ago

Component: UI & SimulationGame setup

Move tickets to Game Setup as UI & Simulation got some sub components.

comment:5 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:6 by Silier, 3 years ago

Keywords: simple added

comment:7 by trompetin17, 17 months ago

Owner: set to trompetin17
Resolution: fixed
Status: newclosed

In 27277:

Additional default colors after D4811

Comment by: Stan

Fixes: #3506
Differential Revision: ​https://code.wildfiregames.com/D4813

comment:8 by Stan, 17 months ago

Description: modified (diff)
Milestone: BacklogAlpha 27
Note: See TracTickets for help on using tickets.