Closed regymm closed 3 years ago
have you considered lag, data and other performance related things?
have you considered lag, data and other performance related things?
depending on how it would be implemented (if at all) performance issues could be very unlikely, as not every block's light would be represented (that would be ridiculous)
Sectors do not run while you are not in them, for performance reasons. That means that while you are looking at the planet map, no sectors are running.
Their states are saved when you leave, and some basic things are simulated based on their last stats (resource production, enemy waves) without running the sectors.
I think OP meant this would be purely for aesthetics
The planet map cannot display the actual maps, it is more like a grid of links to each map. Even if you overlaid a thumbnail of each map on each sector (nevermind the huge amount of processing required to update all of those thumbnails according to their current exposure to the sun), it would look bad aesthetically, as maps are rectangular, but sectors on the planet map are hexagons or pentagons.
However, if you are talking about just generating some fake lights on nighttime sectors on the planet map based on the number of your/enemy buildings in that sector, that might be possible.
I think generating fake lights based on building count is a good idea. It would make the planet screen much more visually appealing. But I'm not sure if lights should show for undiscovered sectors, might give away a enemy base you haven't discovered yet
Maybe something like:
//in psuedocode
for(sector : map)
if ( sector.renderHint == cull ) continue
if ( sector.discovered == false ) continue
generateFactoryLights( sector.player.buildings.count + sector.enemy.buildings.count )
where generateFactoryLights
just samples some noise over a threshold and applies a mask to the sectors texture, or however would work
I might just see if I can implement this, though I've never even looked at the source for this. I'll see if I can find the class that renders the planet view
You would have to modify the campaign save data to store building count for each visited sector. It would not be possible to get this count for sectors you have not visited before the implementation of this feature, even if you had previously captured them.
Hmm, I didn't think about the need to store it. I figured the data would be there since the game already knows what buildings are in a sector, I figured one could just load the sector say headlessly and loop over the buildings. Maybe is it does need to be saved, it can be looped over once and have that data generated. I'm not sure honestly, I've only looked at this code for about 2 minutes now, and I know you probably have loads more experience with this codebase
Well, I'll probably be better off not trying to implement this and leaving it to someone better suited. If there's any help needed, point me to it
Another solution is to not even try to get a building count, given the difficulty of doing so, and just fudge a lightDensity
number based on production stats and enemy base presence, which are already available.
Another solution is to not even try to get a building count, given the difficulty of doing so, and just fudge a
lightDensity
number based on production stats, which are already available.
Brilliant. That would also give the effect of no production = no lights even if there are loads of buildings, which I rather like the sound of
@joshuaptfan Sorry for asking you directly, if you could point me to what class these production stats are stored in and what class renders the hexagons on the planet, maybe I could implement this. I was already working on a sort of alpha map generator that generates the random light spots based on a single input number to post here for anyone that wanted to pick it up. And on that note tho, I know Mindustry has a noise generator somewhere for map generation, maybe that could be hijacked for this purpose
Or, maybe more efficient depending on factors I'm unaware of, an OpenGl 2d light map with a random radial sample in the limits of the sectors pixel size. Then OpenGl can work on fading the lights on a few points rather than an intensive noise loop generating it all. Any thoughts on that?
@joshuaptfan much appreciated!
oof, laptop doesn't have the free space to pull. I'll start working on this tomorrow when I get home
O-O Someone actually tries to make a pr for his feature requests
Thanks for your kind replies. This suggestion is indeed for aesthetics.
Having a way to get an overview of what is built in each sector is another good thing to have(I often found myself clicking on sectors one-by-one to find out the desired one -- I haven't played for long though, just discovered plastinium and thorium), but would be a totally different suggestion.
You might want to change the title of the suggestion consideringthe direction of the suggestion is going to.
I do like this idea, I personally cannot see any actual purpose, but it does sound like a cool aesthetic feature
This suggestion is now stale, and will be automatically closed.
Describe the content or mechanics you are proposing. It would be nice to be able to see lights coming from those captured sectors with factories at night, in the planet overview. Just like what one could see on an airplane passing through big cities at night.
Describe how you think this content will improve the game. If you're proposing new content, mention how it may add more gameplay options or how it will fill a new niche. This will make the planet overview more colorful and makes it better to see a bigger picture of how everything's going on in each sector.
Before making this issue, place an
X
in the boxes below to confirm that you have acknowledged them. Failure to do so may result in your request being closed automatically.README.md
to make sure my idea is not listed under the "A few things you shouldn't suggest" category.