nonamecrackers2 / simple-clouds

Rendering mod that overhauls Minecraft's clouds and weather
Other
11 stars 4 forks source link

[Suggestion]: Organized front-like storm systems #36

Open ebo2022 opened 4 hours ago

ebo2022 commented 4 hours ago

Guidelines

Description of feature request

With there being plenty of suggestions out there for variation, I wanted to quickly address predictability. In the mod's current state, storms will spawn in 100% randomly and there's no way for the player to know when the next one will happen. I'll admit it isn't a huge issue right now since the storms are mostly visual, but I know there are weather-dependent mob farms out there, and it might be a good idea to cue players in on approaching weather especially if you plan to make an addon with tornadoes and hurricanes that could potentially destroy their builds.

Concept

Fronts immediately jumped to my mind thinking about this problem. In real life, fronts are parts of larger low-pressure systems and they constantly change shape. However, I think adding those aspects to the mod wouldn't be feasible due to the following:

  1. The cloud system uses a static Voronoi grid which just slides in some direction over time, making it impossible for a front to change direction.
  2. Lows are often on the scale of hundreds to thousands of kilometers. It wouldn't be fun to walk over a million (1000km * 1000m) blocks just to dodge a cold front.
  3. Simulating the complex interactions and life cycle of a low pressure system would be costly for performance and not worth the effort.

Instead, I think it would be better to keep fronts as their own entities if something like this were to be added. They could be at any orientation relative to the player and would basically just be an organized grouping of cloud types.

Generation

When I talk about the order of cloud types, I'm referring to how they would appear as the front went over the player's position.

In code, a frontal Voronoi cell would be able to be chosen as the next cloud type if at least one of its sides is bordering one of the preceding cloud type. The image below should hopefully illustrate that a bit better.

I don't have many suggestions about how the fronts would actually be placed, but they would be mainly linear and probably shouldn't extend more than 8-10 cells long.

Types

Here are the two major types of fronts I propose. What I describe here is pretty accurate to what's seen in real life.

There are other types in real life, but most of them are either redundant contentwise or impractical:

Final Notes

I don't think adding fronts means the random storms should be done away with entirely. They just need to be less common and smaller in scale/severity compared to organized systems. Relegating them to only generate in the tinier Voronoi cells through some kind of distance check should address the latter part of that.

This is only one solution to the predictability issue and I'm sure there are others that could work too. I just saw this as a good excuse to shoehorn in fronts as a suggestion. ;)

fronts

Luke7381 commented 3 hours ago

The 2st issue can be solved by scaling the fronts down. Crackers mentioned that he will scale down the hurricanes.

ebo2022 commented 3 hours ago

The 2st issue can be solved by scaling the fronts down. Crackers mentioned that he will scale down the hurricanes.

That's something I didn't think of, just scaling the entire low pressure system down.

The other issue still remains, though: relative movement of fronts compared to the rest of the system would be impossible because the cells themselves are static. Having fronts move if entire lows were added is important 1) so the player experiences both the cold front and warm front as the system passes and 2) to simulate the real lifecycle of a low pressure system.

To clarify what I mean by "lifecycle", the surface map below has a low in an earlier stage of development on the left, and the one close to the center has reached the occlusion phase (i.e. the cold front has overtaken part of the warm front and formed an occluded front).

sample-map

But allowing cells to move would be extremely computationally expensive. The Voronoi diagram around the changed areas would have to be recalculated every time a seed point is altered (which would be the mechanism in which the frontal clouds themselves would be able to move), likely once every few tick(s) with how fast the weather updates.

For those reasons, I still think the simplified approach with the fronts on their own is better. I just don't think it's worth overengineering the fronts that much; the player likely wouldn't notice they were experiencing the effects of a low pressure system because the weather patterns would be so spread out even at a "smaller" scale (on the tens of thousands of blocks rather than millions).

What matters more to me is the player being able to know to some extent what sort of weather may be coming if they've played long enough to figure it out, or just looked it up on a wiki ;p