-
Notifications
You must be signed in to change notification settings - Fork 991
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
[Enhancement] Display Stars on the Galaxy Map #9709
base: master
Are you sure you want to change the base?
Conversation
I have no idea if this actually sped it up at all
This is a beautiful implementation of a sorely needed internal reference tool. Aside from its aesthetic value, without something like this the only ways to take advantage of systems with good solar power or solar wind are to memorize which ones are best or to make one's own map. As such, playstyles and ship designs reliant on solar power gain a path towards greater viability- and anyone needing a refuel doesn't have to go "wait, was Anbrim the supernova or Cshudlye?" |
Looking at your screenshots, I really like this. It's beautiful, it's useful, and have I mentioned that it's beautiful? However:
|
I personally think it looks better, but that's what the toggle is for. I could maybe make the stars shrink more when zoomed out?
I've increased the opacity to see if that helps.
I've made the spacing scale with the number of stars in the system (which would result in an wider icon) to help alleviate this. This also stops trinary+ systems from becoming blobs with the new additive blending. |
I've opened a pull request on your repo that has fixes for these issues. |
I've implemented those changes with some slight differences on my end (which is why I did it manually instead of via committing your PR) The system ring now does not vanish if there is no star in that system. The stars also become more transparent when you zoom out, hopefully addressing @mOctave's concerns. |
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
All I'd want is a way to disable the rings, so I can just see the stars, the way apollo astronauts did not see any political borders, just the natural beauty of their pale blue dot. It would help with visually gauging distribution data, like where there are many bright stars, where there are many dim stars, how density and composition change in different places, where the interesting things even are... |
Perhaps we could have a third mode in which the stars are full alpha and there are no rings, maybe could reduce the transparency of the rest of the map elements as well. |
Oh my, this is so beautiful I'll pull this, compile, and stop updating until the release notes mention it... |
@@ -132,6 +132,7 @@ class UniverseObjects { | |||
std::map<const Sprite *, std::string> landingMessages; | |||
std::map<const Sprite *, double> solarPower; | |||
std::map<const Sprite *, double> solarWind; | |||
std::map<const Sprite *, std::string> starIcon; |
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.
Like leaf said, this should be a Sprite pointer and not a string. No use in passing strings around everywhere to then just get the Spriter pointer in the end anyways.
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.
(I'll do Ejo's job.) Code comments all look good.
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.
smth like this
@@ -1091,10 +1103,15 @@ void MapPanel::UpdateCache() | |||
} | |||
} | |||
|
|||
static const vector<string> unmappedSystem = {"map/unexplored-star"}; |
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.
static const vector<string> unmappedSystem = {"map/unexplored-star"}; | |
static const vector<const Sprite*> unmappedSystem = {SpriteSet::Get("map/unexplored-star")}; |
@@ -422,6 +422,8 @@ void UniverseObjects::LoadFile(const string &path, bool debugMode) | |||
solarPower[sprite] = child.Value(1); | |||
else if(child.Token(0) == "wind" && child.Size() >= 2) | |||
solarWind[sprite] = child.Value(1); | |||
else if(child.Token(0) == "icon" && child.Size() >= 2) | |||
starIcon[sprite] = child.Token(1); |
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.
starIcon[sprite] = child.Token(1); | |
starIcon[sprite] = SpriteSet::Get(child.Token(1)); |
Feature
This PR addresses the feature requested by {{definitely so many people, please merge this Derpy I'm begging you}}
Summary
This is a complete rewrite of #7197, which I asked Derpy to close because I was too busy at the time to implement the changes he suggested.
This adds a new map display mode, toggleable via a button, that changes out the system rings at close zooms for star icons tied to each star definition. These automatically populate the map based on the contents of each system, with support for multi-star systems.
When the starry map mode is displayed, at close zooms the system rings become transparent and system colors (showing government, commodity prices, etc) are transferred to the system names instead, blended with the default system name color for visibility purposes. This goes away as you zoom out, with the system names becoming more grey and the rings returning to their full opacity.
The entire map mode can also be disabled by clicking the toggle button, which is located above the zoom buttons in the bottom right.
The new star icons are located in a new
map
folder inside images, and I've relocated the milky way sprite (but not the deprecated galaxy sprite for backwards compatibility) there.Screenshots
Close in view with starry map on:
Another close in view with starry map on:
Close in view with starry map on and a commodity selected:
Zoomed out view with starry map on:
Zoomed out view with starry map on and a commodity selected:
Zoomed out view with starry map off (same as vanilla):
Usage examples
A star (as in stars.txt) can have a n icon sprite defined for it using the
icon
attribute.Testing Done
Looked at the map. Pressed the button. Saw stars.
Artwork Checklist
Will do laterz
@2x
versions of these art assets: {{insert PR link}}Performance Impact
Hopefully none? BatchShader is used to draw the star sprites so it shouldn't affect things too much, and I haven't noticed anything in testing.