Jump to content
  • Advertisement
Sign in to follow this  
stormwarestudios

Simple Multiplayer Weather

This topic is 4220 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I'm beginning to think about different weather systems (WS) in my game (a multiplayer RPG), and I've come to the conclusion that I'll need to do something in the global scale in order to have a decent system which allows for synchronized weather across all connected clients. Some requirements: - The WS must be compact and not issue a large CPU demand. - The WS doesn't need fine placement, but players in relatively the same area (e.g. within earshot/view) should be seeing the same weather effects. - The WS only controls temperature, wind, and precipitation. It does not control humidity, pressure, visibility, or other factors commonly found on the weather channel. The idea is to 'fake it' rather than to have a climatically-accurate system. - The global time of year (e.g. all areas on the map display the same types of weather influenced by factors) determines the type of precipitation available (e.g. snow during winter, rain during rest of the year, electrical storm during summer). The system is mainly representative of a Temperate climate. Some ideas: I *could* create a geographically-global list of "weather front" objects, each exposing features such as: - position and velocity. - cloud coverage (e.g. affecting how bright/dark the game is drawn during daytime). This will generally only vary from "0%" to "100%" in increments of 10%. - rain/snow amount and velocity - presence and frequency of lightning and thunder effects - accumulated precipitation. As the weather front moves over the map, it accumulates water and velocity depending on the terrain type over which it traverses. When it reaches a breaking point, a cloud-burst takes effect, and again depending on its temperature, one of snowfall, rain-shower, or thunderstorm occurs. When a cloudburst occurs, after its duration, the front disappears. There's still a lot that is unfinished here (how do fronts form? what happens if they collide?), but I'm wondering if anyone has come across this sort of concept before, or how they went about implementing it?

Share this post


Link to post
Share on other sites
Advertisement
I did a fairly abstract weather system at one point. I had done one that was very in-depth, but on a smaller scale.

One thing I'll suggest right now, for global weather, is that you keep your time steps in several hour blocks and interpolate between them. It will be a nice effect anyways.

Use large geographic areas as cells, at least three cells high. I kept track of water saturation, heat, and pressure. Heat and water affect the pressure. All variables try to seek equilibrium with their neighbors, although you should use a fudge factor to keep cells with less altitude from every reaching balance with cells of higher altitude.

Water saturation is increased in area with standing bodies of water, and when one area of pressure tries to balance with a neighboring cell, that's wind in the direction of the lower pressure. There should be a wide, fuzzy, hot spot that circles the equator to add heat to the system, to act as the Sun.

When saturation gets too high, it precipitates. The temperature of the precipitating cell determines whether it's rain or snow.

Those are the basic ideas anyways; this particular system isn't very scientific, but it's not CPU intensive, and it looks nice. Let me know if you're looking for something more intense.

Share this post


Link to post
Share on other sites
Doing a complex weather system attracted me too at first, but those CPU cycles are still valuable.

I would recommend keeping any weather system very simple. The intricacies of humidity and pressure will be hard to perceive at best, and lost to the players at worst.

They will look up and see clouds or feel rain. I doubt they will take temp measurements and plot a graph.

So have new weather systems 'emerging' at one longitude (maybe in an ocean, like in RL) and marching round the planet without too much variation on the way. The new strip of weather could shift up and down (N/S) at creation depending on season.

No one player is gonna be able to experience the same weather twice unless your game has FTW travel ( FTW = faster-than-weather!)

Thats all I am doing :) I can't notice its not authentic!

Si

EDIT: Thats not to say weather isn't central to your game. If you are sailing, then its worth more thought. Still, in that case, concentrate on the water, not the wind!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!