-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add basic enemy colors to minimap #795
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
I have left some comments requesting some restructuring of the implementation but it should not be difficult.
Fixes DigitalExtinction#584 The playable player is still always blue, but all other players are assigned a color based on their player number.
refactor PlayerColors to be easier to re-use
implenting the suggested improvements made the tuple struct faster than the hashmap lookup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor formatting note. Otherwise, LGTM. I'll test it later.
Also, please note that I have done some important CI related fixes to |
Fixes #584.
All players are assigned a color based on their player number. It also changes the color of the units slightly to distinguish them from buildings.
In the future I think it would be nice that each player could choose their color from a list of curated colors that are visually distinctive, and then they would always be consistent across single player or multiplayer views. Or they are assigned a color, but then the UI would need to change in other ways so they would know which color they were assigned. This could be as simple as a color bar next to the their name in the game list, or some other color indicator in the HUD.
I'm just learning Rust and Bevy, so hopefully I did things properly. Let me know if you would like any changes.