HOME | DD

Published: 2006-11-24 05:28:42 +0000 UTC; Views: 9723; Favourites: 112; Downloads: 341
Redirect to original
Description
-NEEDS FLASH 8 OR HIGHER-Just a small experiment, that ended up quite hypnotic...
[MouseClick] - toggles blur
[LEFT, RIGHT, UP, DOWN] - controls gravity
[SPACE] - turns off gravity
[1] - snake mode
[2] - lines mode
Trip.
Peace.
***Check out the variation inspired by this work (which is even better imo) -> [link]
[EDIT March, 18. 2007.]
Since several people asked me about the code behind this, here's the basic engine for you to experiment with:
var numPoints = 20;
var speed = 10;
var stageWidth = 550;
var stageHeight = 400;
var points:Array = generateArrayOfPoints(numPoints);
function generateArrayOfPoints(num:Number):Array {
var arr:Array = new Array();
for(var i=0; i
// Objects has 4 properties: (x, y) - position vector, (vx, vy) - velocity vector
arr.push(new Object( {x:Math.random()*stageWidth, y:Math.random()*stageHeight, vx: (Math.random()-0.5)*speed, vy: (Math.random()-0.5)*speed} ));
}
return arr;
}
function movePoints(arr:Array) {
var len = arr.length;
for(var i=0; i
p.x += p.vx;
//check for if it left the screen
if( p.x>stageWidth || p.x<0 ) {
//reverse the x velocity
p.vx*=-1;
p.x += p.vx;
}
p.y += p.vy;
if( p.y>stageHeight || p.y<0 ) {
//reverse the y velocity
p.vy*=-1;
p.y += p.vy;
}
}
}
function plotPoints(mc:MovieClip, arr:Array) {
mc.lineStyle(2,0xaaaaaa,100);
var len = arr.length;
//position the pen on our first point in the array
mc.moveTo(arr[0].x,arr[0].y);
//cycle through our points array
for(var i=0; i
mc.lineTo(arr[i].x,arr[i].y);
}
}
onEnterFrame = function() {
//clear the canvas
this.clear();
//calculate new positions for our array
movePoints(points);
//plot the lines
plotPoints(this,points);
}
Related content
Comments: 126
Nattregn [2006-12-04 22:56:43 +0000 UTC]
Quite fancy, I must say! You never fail to amuse me
👍: 0 ⏩: 1
Mizra [2006-12-04 04:46:05 +0000 UTC]
Again with the wonderful, awesome work on Flash. Every time I see a new work from you, I am amazed at the skill and creativity that goes into each animation or game.
👍: 0 ⏩: 1
ArtBIT In reply to Mizra [2006-12-04 07:09:49 +0000 UTC]
Thank you hon, but these are all just "sketches", I don't finish anything that I s...
👍: 0 ⏩: 1
Mizra In reply to ArtBIT [2006-12-04 13:53:02 +0000 UTC]
You, too? I've been told that I have the mindset of a..
LOOK! Pretty butterfly!!!! *points and watches in earnest*
👍: 0 ⏩: 1
naruto017 [2006-12-02 09:08:55 +0000 UTC]
Thats pretty cool looks like some thing from this stit [link] check it out sometime (>_(<
👍: 0 ⏩: 1
ArtBIT In reply to naruto017 [2006-12-02 17:28:33 +0000 UTC]
damn... all those games are like 3-5Mb...
That's quite a task for my dialUp...
...but the thumbnails look interesting though...
👍: 0 ⏩: 1
Formor In reply to ??? [2006-11-27 16:18:25 +0000 UTC]
Very, very, very ... cool
I played with it for about 30 minutes...
👍: 0 ⏩: 1
GoranCaBuhOcTojuh In reply to ??? [2006-11-26 11:11:56 +0000 UTC]
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa
THIS IS SO FUCKING PHENOMENAL ! ! ! ! !
Way 2 go!
👍: 0 ⏩: 1
Marchudichu [2006-11-25 02:38:55 +0000 UTC]
Holly hell. Completly awesome. Amazing math knowledge. How much time did it take you?
👍: 0 ⏩: 1
ArtBIT In reply to Marchudichu [2006-11-26 16:55:33 +0000 UTC]
Thanks, but it was not complicated at all, no advanced math knowledge also, and it took me about half an hour to do...
👍: 0 ⏩: 1
lexus727 In reply to ??? [2006-11-25 02:11:47 +0000 UTC]
incredible man, ur teaching me that next
👍: 0 ⏩: 1
LOTReHPlp In reply to ??? [2006-11-24 23:49:01 +0000 UTC]
ooooooo!
lol, you've just given me entertainment for the next day!!! hahahaha
👍: 0 ⏩: 1
MilankaTakitak In reply to ??? [2006-11-24 20:42:59 +0000 UTC]
I simply just love all your work, man!
So f***ing great!
DUDE! 8D
👍: 0 ⏩: 1
ArtBIT In reply to Krum-Strashni [2006-11-27 00:25:01 +0000 UTC]
I'm glad you think so neighbor
👍: 0 ⏩: 0
fudging [2006-11-24 16:27:38 +0000 UTC]
Like a Windows Media Player visualisation, but interactive, and not quite the colour diversity. How easy would it be to add in eerie colour changes?
👍: 0 ⏩: 1
ArtBIT In reply to fudging [2006-11-26 16:40:05 +0000 UTC]
Not too hard I guess, two or three lines of code, but I've chosen to change the color depending in which corner you are...
👍: 0 ⏩: 1
fudging In reply to ArtBIT [2006-11-26 17:27:17 +0000 UTC]
Ah, hadn't noticed that happening before I thought it was just a mix between a small selection of colours.
👍: 0 ⏩: 0
wonderwhy-ER [2006-11-24 12:31:14 +0000 UTC]
Heh. Cool. I will try to remake it witm my bazier engine. Looks similar to my aerodinamic cursor Need to try it with bazier. Look like smoke if lines are small. I will try to remake it with baziers. MAy be it will look better then
👍: 0 ⏩: 1
ArtBIT In reply to wonderwhy-ER [2006-11-24 12:40:17 +0000 UTC]
It prolly will look better with curves, but it will make it quite slower also...
👍: 0 ⏩: 3
wonderwhy-ER In reply to ArtBIT [2006-11-24 18:16:24 +0000 UTC]
Here i've finished it. Yors look better tought. Do you use blur?
👍: 0 ⏩: 1
ArtBIT In reply to wonderwhy-ER [2006-11-25 20:18:45 +0000 UTC]
Wow, looks pretty sweet, and thanks for the linkBack (*/me does the same)
Yes, I used Blur ([MouseClick] - toggles it)...
Cheers.
👍: 0 ⏩: 1
| Next =>