View Full Version : Challenge -- Bad Weather
All right people, time for a new challenge. I was thinking about something weather related: rain, snow, lightning... that kind of things (it's going to be Christmas soon...). What do you think? :)
senocular
10-22-2003, 10:32 AM
leaves blowing in the wind? ;)
Whatever, whatever... :rolleyes:
vulcanpimp
10-22-2003, 12:27 PM
was gonna say be more specific - cos that kinda includes an awful lot. snow is a thing by itself and we've just had elctric(lightning) on kirupa.
But yep - count me in.
vulcanpimp
10-29-2003, 12:29 PM
I know I've tried to get a few challenges going recently but can't seem to get anything. I started a 3d challenge , then a paint dripping contest - but don't think I hardly got a response (and when a response came with the 3d challenge it was weeks later)
What about an open challenge - on any subject - that might generate a bit of interest?
having said that I haven't done anything for this.
Thunder version betafunction makeLightning () {
}
/*** Constants ***/
max_sub_branch = 4 ;
max_sub_angle = 3*Math.PI/5 ;
max_size = 6 ;
length = 10 ;
/*** Function ***/
function makeBranch ( targ, start_x, start_y, angle, size ) {
if (size > 0 ) {
c++ ;
var cl = targ.createEmptyMovieClip ("light" + c, c) ;
cl.lineStyle ( size, 0xffffff, 100 ) ;
cl.moveTo ( start_x, start_y ) ;
while (start_y < 400) {
var end_x = start_x + length * Math.cos ( angle ) + random(10) - 5 ;
var end_y = start_y + length * Math.sin ( angle ) //+ random(10) - 5 ;
cl.lineTo ( end_x, end_y ) ;
start_x = end_x ;
start_y = end_y ;
if ( Math.random() > .9 && cl.sub < max_sub_branch ) {
cl.sub ++ ;
var newLength = length -1 ;
var newAngle = Math.PI/4 + Math.random() * Math.PI/2 ;
var newSize = size - 1 ;
makeBranch ( cl, end_x, end_y, newAngle, newSize ) ;
}
}
}
}
/*** Function call ***/
this.onMouseDown = function () {
c = 0 ;
this.light1.removeMovieClip () ;
makeBranch ( this, 250, 0, Math.PI/6 + Math.random() * 2/3*Math.PI, max_size ) ;
this.light1.onEnterFrame = function () {
if ((this._alpha -= 5) < 5) this.removeMovieClip () ;
}
}Dark background, and click.
Ninfoxwoods
11-08-2003, 10:09 PM
http://server2.uploadit.org/files/091103-lightning.swf
^Heres Pom's code just with Sound and the lightning is yellow instead of white.
fileyboy
11-09-2003, 11:09 AM
very cool pom
|
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.