Page 1 of 1

wind :P

Posted: Sat Dec 21, 2013 10:21 am
by Dysoch
i know wind was added in 0.8. aswell as the ability to call direction and speed.
  • is wind already ingame?
  • is it randomly generated?
  • is the direction randomly generated?
  • is it possible to add it to data definitions? (in terms of power generation!)
  • if that isnt possible, is it possible to call it throu event?
in cause some people dont understand this, im trying to make a wind generator! (power wise :P)

Re: wind :P

Posted: Sat Dec 21, 2013 12:11 pm
by ssilk
Not to forget the clouds. (Btw with low resolution the clouds-shadow look ugly.)

Re: wind :P

Posted: Sat Dec 21, 2013 9:43 pm
by FreeER
Well, from source it should be three doubles, game.windspeed, game.windorientation, and game.windorientationchange. I can't tell that it does much more than move the clouds a bit right now...or where windspeed might change but, that should allow the creation of a wind turbine, with some extra coding (and maybe a bit of testing). Wind orientation seems to between 0 and 1, and windorientationchange is simply added to the orientation (every tick?) with a random chance (randomGenerator() < 0.001, whatever that chance may be) of being inverted (starts at 0.0001 and don't see it changing anywhere else)

Short: so currently (from what I can see) the wind speed never changes, wind orientation changes from 0-1 based on the addition of windorientationchange which starts at 0.0001 and can be randomly multiplied by -1 to reduce the orientation instead of increasing it.

off topic..hm you can also write to game.tick (of course there is a comment: // to be used with care, lol)