Prophesy of Pendor Dev Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Forum for the Development Team associated with the Mount&Blade Module Prophesy of Pendor Development
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Dynamic Region dependend Weather

Go down 
3 posters
AuthorMessage
abhuva
Mind Reader
Mind Reader



Posts : 191
Join date : 2011-06-27
Age : 44
Location : Germany

Dynamic Region dependend Weather Empty
PostSubject: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyTue Oct 11, 2011 12:24 pm

Cause this is a system for itself i want to seperate it here,

Weather in M&B currently uses 2 variables: cloud-amount and haze-amount
The first controls rain in battle-maps, the second the fog.
Now the idea is to make a region depended simulation on base of this.

How to store the Data
Spoiler:

ok, so far so fine... now how do we really simulate the weather?
Spoiler:

Now how do we recognize all this in game?
Spoiler:

How can we design now the climate/weather of Amala?
Spoiler:

A final note:
This is a highly dynamic system. Lots of randomization, but also strict rules...
What you recognize ingame tough is at first sight very subtle... but keep in mind that linking such systems creates a truly dynamic, living and breathing game-environment.



EDIT:
Wrote the script and tested (its still a very basic version), but so far everything seem to work very well. Weather gets updated on your position, and overall i didnt found really hard jumps in the weather conditions (its a bit hard to test currently cause i have no idea how to visualize this complex data in realtime)

Back to top Go down
http://abhuva.wordpress.com
Mordred
Insidious Diety
Insidious Diety
Mordred


Posts : 2523
Join date : 2009-07-17

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyWed Oct 12, 2011 10:26 am

I can't wait to see this weather model in game! Your excitement is contagious Razz
Back to top Go down
abhuva
Mind Reader
Mind Reader



Posts : 191
Join date : 2011-06-27
Age : 44
Location : Germany

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyWed Oct 12, 2011 7:46 pm

Little update on the progress:

After lots and lots of debugging, and rewriting from scripts it seems to get stable now.
Wrote a little mini-script which helps me analyze the weather situation in a given region over the amount of a year to check how the system is behaving...

Thanks to mordred we have now a detailed design about the weather-situation in each region for each of the 4 seasons.
The regions influence each other (and the desired weather situation) more than i first thought, so i might need some time rebalancing the stats till its like we wanna have it...

But the good news are: i got rid of a nasty bug in the triangle collision detection (rewrote the algorithm so i dont need any more divisions, i hate m&b now for its inability to handle floating point variables =P)

Edit: I am still tweaking heavily the algorithms to get a better result.
The main problem is the smoothing process right now.
Cause its a very small grid overall, pendor gets for example heavy influenced by ashenborn...
To make this a bit better i changed this so that the actual region wich gets smoothed counts doubles, also Seeds will count double (so they have more weight than normal regions)

Edit2:
With those changes (Region that gets calculated and Seed Regions count double during smoothing process) the system behaves now way more like i wanted.
Tested atm only average cloud/fog amount for the 4 seasons - The numbers i get are pretty close to what we designed.

Another thing i will try out is to use another dummy-array during the smoothing, so i dont overwrite the original data till its completely smoothed.
Guess i will also compile a test-version tomorrow - so that everyone can jump in and try it out...
Back to top Go down
http://abhuva.wordpress.com
abhuva
Mind Reader
Mind Reader



Posts : 191
Join date : 2011-06-27
Age : 44
Location : Germany

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyThu Oct 13, 2011 4:29 am

Finished the main stuff...
You can download my Test-Module (just unpack in module folder and play).

http://www.mediafire.com/?dscpffjdkxnbczw

Make sure to run with cheat-mode and edit-mode enabled (else you dont have acess to some needed features to test things out easy).

Whats new:
-Regional Weather system
-Move Speed modification based on terrain and weather

When you go to report menu there is a new menu right at the top called Weather Report.
This option will take the region you are standing at this moment, and calculate the weather for this region over the amount of 1 year.
It will show then min, max and average amount of cloud and fog for each season in this specific region.
Note: there are 22 single regions (you can find the map of the regions in the move-speed thread, or here: http://abhuva.wordpress.com/

In Camp menu there is an option "Visit Scene" or something like this... this will generate the scene in the same way like random battlefield generation will do, and take fog+rain into account. Thats good to jump fast in and get an idea how a specific region may look like (its a native feature, so i am not totally sure how exact this resamples the battlefields)

Note that i am currently using natives version of fog-creation in scenes... this needs improvement too... atm up to 90 fog will have very little effect and than it jumps suddenly to an extreme (tough in the simulation i rarely ever reach 100) - i will make a mission-template trigger to make this more smooth, so that 50 fog also have an effect in the scenes. Same applies to rain, tough this seemed to be better actually.


The movespeed system is tied to to the weather and the terrain.
heavy fog and rain will slow you down, hilly terrain (currently only in ashenborn) will slow you down
the trade road will feel like a highway instead =)

Most of this stuff needs balancing etc...
Just try around a bit and tell me how you like it / what needs serious balance etc..
Looking forward to all of your reports, feedbacks and critics...
Back to top Go down
http://abhuva.wordpress.com
Akuthia
Thought Warden
Thought Warden



Posts : 118
Join date : 2011-09-13

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyThu Oct 13, 2011 2:14 pm

just standing in one spot:

it seems like cloud cover doesnt really do anything at all until about 80 ish, and rain won't appear until 90+, and the same with fog, anything under 80 had no affect, top click was full on fog, 1 click down was semi fog, and then below that was a perfect day.

I think this is a limitation from native, so if you're not able to adjust it, i wouldnt blame your code.

edit: In general, i would expect the fog level to decrease during the day, with it's peak being in the early morning hours (either "early morning" or "dawn" in game terms.

I also wonder if every 2 hours isnt a bit frequent o be checking it. For realism sure, it's great, but i wonder how much overhead could be saved if it just checked it every 4 hours (once per day period)
Back to top Go down
abhuva
Mind Reader
Mind Reader



Posts : 191
Join date : 2011-06-27
Age : 44
Location : Germany

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyThu Oct 13, 2011 3:56 pm

To summarize the ideas we talked about in chat:

- fog density depending on time of day (more in the morning and evening, less during day and night)
- possibility to fine tune how often weather gets updated for the player, to help minimize overhead for ppl with older comps (tough to be honest, i dont think its needed, its only very simple calculations with tables so nothing too demanding here)
- battlefield / scene fog and rain better fine-tuning regarding the numbers, (50 fog should be visible already)
- about the rain was my idea to interprete the rain-number not as strenght, but instead as value how great is the chance that it actually rains (like 60 means 60% chance)
- depending on that make an extra entry in the table if its actually raining in an area or not (that means if we re-enter a scene during the same hour and its raining in the first it should also rain in the second)
- make implementing of weather events more costumizable (setting cloud/fog/roughness and how long this effect will appear per region)
Back to top Go down
http://abhuva.wordpress.com
Mordred
Insidious Diety
Insidious Diety
Mordred


Posts : 2523
Join date : 2009-07-17

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyThu Oct 13, 2011 4:35 pm

abhuva wrote:
To summarize the ideas we talked about in chat:

- fog density depending on time of day (more in the morning and evening, less during day and night) I like it, nice idea.
- possibility to fine tune how often weather gets updated for the player, to help minimize overhead for ppl with older comps (tough to be honest, i dont think its needed, its only very simple calculations with tables so nothing too demanding here)One thing you may wish to try to do, is make sure the checks fire on "off" times, ie when there are not many other checks going on. The start of the day is a bad time, 10:30 in the morning is probably a good time.
- battlefield / scene fog and rain better fine-tuning regarding the numbers, (50 fog should be visible already) Yup
- about the rain was my idea to interprete the rain-number not as strenght, but instead as value how great is the chance that it actually rains (like 60 means 60% chance) I would have used this for fog (and use a standard amount of it) for rain, I think it works on how hard it is raining. This way we can ensure that Players are always able to see in the fog, as this is the facet I am most concerned about.
- depending on that make an extra entry in the table if its actually raining in an area or not (that means if we re-enter a scene during the same hour and its raining in the first it should also rain in the second) Definately
- make implementing of weather events more costumizable (setting cloud/fog/roughness and how long this effect will appear per region)Customised by the Player, or us? I thought that is what we were doing already?
Back to top Go down
Akuthia
Thought Warden
Thought Warden



Posts : 118
Join date : 2011-09-13

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyThu Oct 13, 2011 4:40 pm

Mordred wrote:
abhuva wrote:
To summarize the ideas we talked about in chat:

- fog density depending on time of day (more in the morning and evening, less during day and night) I like it, nice idea.
- possibility to fine tune how often weather gets updated for the player, to help minimize overhead for ppl with older comps (tough to be honest, i dont think its needed, its only very simple calculations with tables so nothing too demanding here)One thing you may wish to try to do, is make sure the checks fire on "off" times, ie when there are not many other checks going on. The start of the day is a bad time, 10:30 in the morning is probably a good time.
- battlefield / scene fog and rain better fine-tuning regarding the numbers, (50 fog should be visible already) Yup
- about the rain was my idea to interprete the rain-number not as strenght, but instead as value how great is the chance that it actually rains (like 60 means 60% chance) I would have used this for fog (and use a standard amount of it) for rain, I think it works on how hard it is raining. This way we can ensure that Players are always able to see in the fog, as this is the facet I am most concerned about.
- depending on that make an extra entry in the table if its actually raining in an area or not (that means if we re-enter a scene during the same hour and its raining in the first it should also rain in the second) Definately
- make implementing of weather events more costumizable (setting cloud/fog/roughness and how long this effect will appear per region)Customised by the Player, or us? I thought that is what we were doing already?

right now it is firing every two hours, or twice per time period, so i think thats every 2 hours...
Back to top Go down
abhuva
Mind Reader
Mind Reader



Posts : 191
Join date : 2011-06-27
Age : 44
Location : Germany

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptyThu Oct 13, 2011 5:17 pm

The radioactiv, contaminated lands of the Snake Cult =)
Spoiler:
More of a prove of concept, this needs serious color-tweaking...

Quote :

Customised by the Player, or us? I thought that is what we were doing already?

The system currently is running as simulation, so we define the basic outlines, but in itself the system acts independently...
The idea for weather events was that we are able to say: oh exactly now, for the next 5 hours it will be very foggy and rainy in region xy..
(like the a god comes, really angry about something and makes a storm)...
So we alter the weather situation dependent on events thats going on... mhh not sure how i shall this explain better

EDIT:
A reminder for myself: the green fog in snake land shall be linked to 2 variables: first the distance to their capital, and second to the power of the Cult. This means when the Cult is defeated the lands will no longer appear green, also the deeper i go into snake land, the greener and the thicker the fog is (as long as the Cult is alive)
Back to top Go down
http://abhuva.wordpress.com
abhuva
Mind Reader
Mind Reader



Posts : 191
Join date : 2011-06-27
Age : 44
Location : Germany

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptySat Oct 15, 2011 12:50 pm

Update:

Rain will get calculated a bit more complex now:
The cloud amount will only tell the percentage chance if its raining or not (and also what skybox we see) -> this means it can be cloudy without rain
If its indeed raining, then it will store the strength of that rain (currently randomly choosen from 0..100) -> this means if we re-enter a scene, the rain/fog settings will always stay the same.

Also, in snake terrain, the fog you see in scene will get tweaked according to your partys distance to the snake capital.
The closer you get, the thicker the fog will become.
This kinda overrides the weather settings (but only for the scene, not for the actual calculations atm).

Reminder for myself, need to link this special info to the mov-speed scripts.
Also: Snake troops should get a bonus for moving in fog in my opinion, else it would make no sense that they cover their terrain with fog in a magical way.
Back to top Go down
http://abhuva.wordpress.com
Akuthia
Thought Warden
Thought Warden



Posts : 118
Join date : 2011-09-13

Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather EmptySat Oct 15, 2011 4:00 pm

I'm not sure about a bonus, but i'd be fine with "lack of penalty", in other words, if everyone suffers 10% speed loss in fog, then the cult doesnt suffer that.
Back to top Go down
Sponsored content





Dynamic Region dependend Weather Empty
PostSubject: Re: Dynamic Region dependend Weather   Dynamic Region dependend Weather Empty

Back to top Go down
 
Dynamic Region dependend Weather
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Prophesy of Pendor Dev Forum :: Siege Workshop-
Jump to: