Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Weather - Wind  (Read 520 times)
analysis_junky
Customers
Community Member
*****
Posts: 144


WWW
« on: March 13, 2008, 04:43:15 PM »


I am building a Weather class for an MMORPG that is responsible for weather related events including wind...

What is the best way to implement this?

I think it should run on a seperate server and update each client based on the client's in-game location(region).

The wind should affect MiniMesh grass (sway back and forth) based on the grass position in the world...

I want to initially make a seperate application that shows the current weather patterns of the world, kind of like a radar. This app should also be able to change the weather.

The idea of wind, rain, etc is that it should be in clusters - i.e. an invisible blob in the world that moves, which in turn, should affect in-game objects.

How much of a bandwidth problem would it be to send/receive an array of wind speed values?
How often should this system update itself if bandwidth does become an issue?

Has anyone here done this?

Any input is appreciated!


Logged

Project: Eternis Prime
Raine
Customers
Community Member
*****
Posts: 1189


« Reply #1 on: March 13, 2008, 05:30:49 PM »

I too have been thinking about weather to implement it in Darkmana. While it might be easy to picture, to imagine, it requires a good dose of faking, since modeling a proper weather model could be way beyond a system's resources.

Wind is hard to cluster precisely, imho. I think it would affect many world regions, with different strenght the more you get further from the most windy point. Imagine a sine function and its waving. This leads me to think that it requires a coarser grained form of clustering. You can also "lerp", so to speak, the wind intensity via a formula. I don't know if you want to take in account the "temperature" of the air, whether it's a cold wind or a warm one.
   In any case, you could send the most windy point, and let each client interpolate the wind intensity in the nearby areas, perhaps even reaching a negative factor, which would simulate the pseudo-random movement of the air.

As for rain... I could say the same. However it happens that rain might stop more abruptly all of a sudden, and start in the same fashion.

All of these are not "local" events. They affect nearby areas. Knowing that you have a specific range where the weather should affect the world, you can send a "weather effect start position", along with its intensity and some kind of tuning value to allow you to customize the effect. If the player is just too far from this event, he / she won't receive it, whereas a player in the range of the effect will see its client interpolate the values the server sent and modify the weather accordingly. It has to be deterministic, in the sense that every client in the same position has to see the same weather.

That's all I can come up with at the moment, I'm sure it can be done better. One thing is to design, another to implement. Tongue

Hope this helps anyway!
« Last Edit: March 13, 2008, 05:32:34 PM by RaineC » Logged

analysis_junky
Customers
Community Member
*****
Posts: 144


WWW
« Reply #2 on: March 16, 2008, 05:28:37 AM »


That's a good point; I shouldn't have to send all affected points/values, rather just these values to locally build the weather on each of the clients:

Position - Central position of the weather event
Size - Overall size of the weather pattern
Type - Define the type of weather
Intensity - Peak intensity at its focal point
Falloff - How the intensity value decreases further away from the central point
Maximum View Distance - What is the furthest away that this can be seen



These values should only be sent if there is a change. The performance hit from bandwidth should be minimal Smiley

Logged

Project: Eternis Prime
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks