Archived

This topic is now archived and is closed to further replies.

Weather engine using a finite state machine

This topic is 6358 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

Hey guys, I''m writing a generic game engine using OpenGL, and I need to know how I can incorporate a weather engine into it. I''ve seen one done before using a finite state machine, and I was wondering if people have done this sort of thing before. I''ve already coded a particle engine that produces realistic-looking rain and snow. I guess some of the states would be: Fine Cloudy Raining (+ Cloudy) Lightning (+ Cloudy + Raining) Snowing (+ Cloudy) I suppose these states would be calculated based on the current state, a percentage chance of changing to each of the other states, and what time of year it was (ie. it wouldn''t be snowing in summer unless it was the polar regions or something)... I already posted this in the AI section, but I thought I''d post here too... Samah

Share this post


Link to post
Share on other sites
You might try Fuzzy State Machines. They are more suited to things that have "in between states" like weather... I don''t know much about them though, so I couldn''t really explain them. There is some stuff about them in Tricks of the Windows Game Programming Gurus, and I''m sure you can find some info on the net. (Fuzzy State Machine = FuSM)

Share this post


Link to post
Share on other sites
Tropical ocean currents bring humidity from the coast inland. High mountains suck in the bad weather with low pressure zones. Mountain ranges inland from the coast get progressively less precipitation as they are farther inland because each one catches some and passes the rest on. Coldness is a function of altitude and latitude and season.

Consider just these factors:
Weather migrates from the high pressure zones to the low pressure zones, attempting to balance things out. Humidity is greater near the ocean. Arid areas also get precipitation, often in late summer in the form of afternoon thunderstorms. Deserts also get snow, (high deserts, that is) and arid (desert) environments do not retain the heat like moist environments.

Oh, so many things to think about. And you probably just wanted some rain on a city street.

Share this post


Link to post
Share on other sites