PDA

View Full Version : my humble tries



supersatori
September 29th, 2002, 03:19 PM
SORRY ! this code is a pure **** hacked in a few minutes on a previous quick try to bit101 25lines contest which I discovered just after it was closed. That's why it so obfuscated (I removed some most obscure lines though) set to 50 fps and a 0xcccccc background.
use shift to toggle negative depth visibility and space to toggle sinusoidal gig.

clips=[];
nbx=4;
nby=3;
nbz=3;
nbclip=nbx*nby*nbz;
_x+=Stage.width/2;
_y+=Stage.height/2;
tx=0;
ty=0;
tz=0;
x=0;
y=0;
z=-50;
for (var i=0;i < nbclip;i++) clips.push(createEmptyMovieClip("o"+i,i+1));
for (var i in clips) {
clips[i].lineStyle(10,0xffffff,100);
clips[i].lineTo(0.2,0,0);
clips[i].lineStyle(8,0xcccccc,100);
clips[i].lineTo(0,0,0);
clips[i].x=-Stage.width/4+tx*Stage.width/2/nbx;
clips[i].y=-Stage.height/4+ty*Stage.height/2/nby;
clips[i].z=tz;
clips[i].i=i;
clips[i].rotation=Math.random()*360-180;
if (++tx ==nbx) {
tx=0;
if (++ty == nby) {
ty=0;
tz+=0.25;
}
}
}
target=nbclips-1;
this.onEnterFrame=function() {
_rotation=rotation+=(eval("o"+target).rotation-rotation)/20;
x+=(eval("o"+target).x-x)/20;
y+=(eval("o"+target).y-y)/25;
z+=(eval("o"+target).z-0.2-z)/30;
for(var i in clips) {
var mc=clips[i];
mc._x=(x-mc.x)/(dz=mc.z-z);
mc._y=(y-mc.y)/(dz);
mc._xscale=mc._yscale=200/(clips[i].z-z)* (Key.isToggled(Key.SPACE) ? (Math.sin((mc.i=(mc.i+1)%(nbclip))*2*Math.PI/(nbclip))/2+1) : 1 );
clips[i].swapDepths(clips[i]._xscale);
clips[i]._visible=Key.isToggled(Key.shift) || clips[i]._xscale>0;
target= Math.abs(z+0.2-eval("o"+target).z) < 0.05 ? Math.floor(Math.random()*nbclip) : target;
}
};I wondered: does it correspond to the contest rules ? can someone tell me more about this contest ? I don't really catch its goal. (pom?)

supersatori
September 29th, 2002, 03:31 PM
a small link http://trash.supersatori.com/20020929/
(for those who are interested here is from what it comes from http://trash.supersatori.com/20020929/25line6.html)

pom
September 30th, 2002, 05:34 AM
Nice to see you here! Anyway, you shouldn't worry too much about the rules, really. Anything that remotely looks like a grid will do.

Concerning the goal, bon j'en ai marre de l'anglais. En fait au départ, je voulais un petit concours entre nous, tranquille pépère, mais ça c'est transformé en truc super sérieux en cours de route. Donc voilà. Du moment qu'à un moment ou à un autre de ton anim, quelqu'un de normalement constitué pense au mot "grille", c'est bon. :)

Very very nice, by the way.

pom :asian:

supersatori
September 30th, 2002, 12:35 PM
another try http://www.trash.supersatori.com/20020930/

Ryall
September 30th, 2002, 06:24 PM
I really like the last one youve posted... it aliveee!!!!!:rambo:

polykrom
September 30th, 2002, 07:58 PM
Originally posted by supersatori
another try http://www.trash.supersatori.com/20020930/


Very very nice ... really :-)

Congratulations Bertrand...


[PoLy]

sintax321
October 4th, 2002, 04:15 PM
That second one is amazing. Really Nice.:)