Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upViewing sky/weather over player position #27947
Conversation
int-ua
changed the title
[CR][WIP] Viewing sky over player position
[CR][WIP] Viewing sky/weather over player position
Jan 28, 2019
This comment has been minimized.
This comment has been minimized.
|
The other weather related things should probably be also visible in the same window. Even if they are in the normal side bar I think they should also be in the "sky" window. Temperature, humidity, pressure and win. |
This comment has been minimized.
This comment has been minimized.
|
I really need to add debug menu stuff for wind, once I get my head around the debug options. |
This comment has been minimized.
This comment has been minimized.
|
wrt to sight range of viewing sky, the weather types themselves have various visibility modifiers.
^^ 1.2f is the sight range reduction for the player. This could change the sight range of looking at the sky for surrounding weather. |
This comment has been minimized.
This comment has been minimized.
KITbutler
commented
Jan 28, 2019
|
Can that screen print special symbols, such as arrows representing wind direction? A regular human should be able to tell the wind on their own tile as well as get the direction (but very inaccurate speed) of any nearby clouds moving above. The weather reader bionic wouldn't realistically add much on this scale, the most I would expect is a LIDAR/laser scattering system capable of detecting rainfall and the "exact" speed of clouds. Printing humidity, pressure, air temperature, depth-penetrating scans of storms etc. would require standing still for proper calibration followed by a lengthy analysis. If you even have the multi-wavelength tools to do it in the first place that is, a proper weather radar is beyond our ability to carry or power. No idea regarding the coding but the sidebar in your screenshot has plenty of space for all weather info we could conceivably have access to. If that is too hardcoded maybe you can make an overlay similar to the (f)ire or "look around"/mouse cursor panel? |
This comment has been minimized.
This comment has been minimized.
|
You can make it so the higher survival skill you have the more specific the map gets. So at a survival skill of zero you can only tell dark clouds, and light ones apart. Whereas the higher your skill becomes the better you can differentiate what clouds do what. Perhaps different equipment will reveal more about the map. |
This comment has been minimized.
This comment has been minimized.
|
I like the idea of higher survival skill getting you better information. I've been hoping for a while that we could get a function that will let us look at the sky and take a stab at guessing what the day's weather might be like; maybe that can be implemented as part of this screen, with sentences like this: Low survival skill: "Looks cloudy." Medium survival skill: "You think it might rain today." High survival skill: "It's probably going to rain around noon for a few hours." There should be a chance for the guess to be wrong, with higher survival skill meaning better accuracy. Other folks have suggested that having specific equipment will help with weather predictions, which might be required to get a weather estimate with the confidence and granularity of pre-Cataclysm forecasts. As you've pointed out, that would be pretty complicated though, especially the high survival skill one, since it needs the game to calculate weather in advance. |
This comment has been minimized.
This comment has been minimized.
But first three only with tools, of course.
Sounds relatively hard to do. On showing wind direction. I kind of like the idea of an arrow with pluses even on this screen because player have a way to measure wind speed directly only in one point. But maybe there is a better way that wasn't described yet. Cloud movement can be seen by waiting and looking at the sky again. Yes, in reality you can estimate cloud speed almost instantly if they have it above some threshold but I'm not sure if such thing as cloud movement direction is even present in current implementation. I just skimmed through |
This comment has been minimized.
This comment has been minimized.
|
On predicting weather in UI: that is a good idea, of course, but I'll limit this PR to viewing current state. It's already hard for me as it is, sorry. Maybe someone else wants to add prediction? |
Night-Pryanik
reviewed
Jan 29, 2019
src/handle_action.cpp Outdated
Night-Pryanik
reviewed
Jan 29, 2019
src/handle_action.cpp Outdated
This comment has been minimized.
This comment has been minimized.
KITbutler
commented
Jan 29, 2019
My idea was to display the local wind direction on cloud tiles, perhaps with a more stringent range limit than the overall map. The idea being that you can tell with your bare eyes which direction the clouds seem to be moving in at least once they reach a certain speed (i.e. low wind speeds would render as "stationary") even if you can't get a reasonable estimate of said speed. With a weather reader bionic or a portable device you could point it at a specific cloud tile (only clouds and rain/snowfall!) and use RADAR/LIDAR techniques to estimate the movement speed of said clouds, either as an "activity" with a time cost or "for free" as a sidebar display similar to how the overmap displays the location name of the currently selected tile.
True, but do we have any underlying code which consistently models a two-layer atmosphere? The surface wind has to be powered by something and the rainclouds are also moved by wind so making it a single self-consistent layer would at least be a good first step for improvement otherwise. Adding RNG to readouts or expanding to a proper two-layer model can be done later if it is deemed worth the effort. Full weather maps probably would require a network of actual weather stations, in particular the high/low-pressure regions commonly used to display wind directions would be almost impossible to construct from a single location. On the flip side simple fluid tube thermometers and barometers should be almost trivial to craft and can be calibrated using water (freezing+boiling for the thermometer, see Celsius scale) and some basic math. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Unfortunately, that's two pieces of information and we have only one symbol to display weather on one overmap tile. Can you please draw how you see it over my screenshot in the previous comment? |
int-ua
changed the title
[CR][WIP] Viewing sky/weather over player position
[WIP] Viewing sky/weather over player position
Jan 29, 2019
This comment has been minimized.
This comment has been minimized.
I've changed visibility to be just double of usual sight points. |
This comment has been minimized.
This comment has been minimized.
|
I'd like this to be merged in current state of features (plus fixing any problems in case they are present) and move implementation of all the other suggestions to different PRs. What do you think about that? |
int-ua
changed the title
[WIP] Viewing sky/weather over player position
Viewing sky/weather over player position
Jan 29, 2019
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/wip-looking-at-the-sky-around-player-position/18594/1 |
1 similar comment
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/wip-looking-at-the-sky-around-player-position/18594/1 |
This comment has been minimized.
This comment has been minimized.
Nah I just meant that there is already a nice neat weather_type that loads of other functions can call and the debug weather view can show ( as above ) , "SUNNY/CLOUDY/SNOW" etc but then wind is kinda tacked on as another thing, it'd just be neater and less confusing to have one place where you can ask the code |
This comment has been minimized.
This comment has been minimized.
So you want to add a new function that will return everything for a given overmap point? That sounds great. I've looked into |
This comment has been minimized.
This comment has been minimized.
|
As far as I can see it just effects player sight range for monsters and stuff - you can see on the minimap if you debug change weather, the visible circle shrinks. |
kevingranade
added
0.D Freeze
and removed
0.D Freeze
labels
Jan 29, 2019
This comment has been minimized.
This comment has been minimized.
Bidiguilo
commented
Jan 30, 2019
|
gosh my eye hurts after going full screen in that one photo lol |
This comment has been minimized.
This comment has been minimized.
You are not the first to say this and I'm starting to worry. Will changing colors be enough? Any other suggestions? I'm trying to change background color. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Bidiguilo
commented
Jan 30, 2019
•
|
Now that is great! This will be a great addition to my game and i will now know when to roam around with my solar car when it is not going to rain all day. But i think that the thunderstorm is blending in with the rain too. |
This comment has been minimized.
This comment has been minimized.
Achie72
commented
Jan 30, 2019
|
Why not use a color scheme that is used already, and helps to differentiate more easily? |
This comment has been minimized.
This comment has been minimized.
|
That does look good. I don't see a legend; you might want to see if you can add one, to help people who aren't familiar with the map yet. |
This comment has been minimized.
This comment has been minimized.
Just like in reality you can't be sure about how exactly weather is going to change. I've run some tests and the part you see gives you only several hours estimation.
Agreed, I'll try to improve that.
Don't forget that this game is playable in text mode without tiles and color selection is extremely limited there. Check the Color manager in game. I've verified that this map is working as expected in Linux terminal but I've seen something about some Windows text mode having extreme shortage of colors - just 8. Can someone confirm that map is usable there please?
Code in this PR is just an addition to the general overmap code. If this feature is accepted into the game it may be feasible moving this into a separate view and that would allow more freedom. But for now it's showing what weather is under the pointer just like with features on usual overmap view. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Achie72
commented
Jan 31, 2019
Sorry, i'm not really familiar with the code yet, just trying to start learning the code in a few days. |
This comment has been minimized.
This comment has been minimized.
|
this woudl work well with a revival of #27215 |
ifreund
removed
the
0.D Freeze
label
Mar 8, 2019
This comment has been minimized.
This comment has been minimized.
|
Summary suggestion: |
kevingranade
merged commit 5c1ee3f
into
CleverRaven:master
Mar 9, 2019
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/wip-looking-at-the-sky-around-player-position/18594/1 |
3 similar comments
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/wip-looking-at-the-sky-around-player-position/18594/1 |
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/wip-looking-at-the-sky-around-player-position/18594/1 |
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/wip-looking-at-the-sky-around-player-position/18594/1 |




int-ua commentedJan 28, 2019
•
edited
Summary
SUMMARY: Features "Ability to view weather around player position"Purpose of change
Give player a chance to see sky/weather overhead for trying to predict weather changes and act accordingly.
Describe the solution
Added new action "Look at the sky" that displays weather map limited to line of sight with double visibility. Currently it's under "Look..." in actions menu (
Enter).Overmap weather glyphs and colors changed (see screenshot below).
Debug weather and this view is limited to z 10 only.
Describe alternatives you've considered
Describing weather overhead by text. Requires a lot of code and text to cover a wide area.
Additional context
Along with the benefit in itself this feature will allow adding usable and realistic ability to sun-dry some food.
Requesting comments on:
Any suggestions on how to add a legend?Should weather representation be changed? On this map only or along with debug weather map?Where is the best place to storesight_pointsfor viewing sky? It's currently hardcoded, but it's just a PoC. Is 20 a good value?Current state of viewing debug weather (types captioned after making the screenshot):

and player-visible part (usual overmap sight points doubled)
