Shop Mobile More Submit  Join Login
-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<num; i++) {
    // create a new object and place it in the array
    // 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<len; i++) {
    var p = arr[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<len; i++) {
    //plot a line to the current point
    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);
}
Add a Comment:
 
:iconchisa3:
chisa3 Featured By Owner Jun 29, 2012  Student Artist
this was awesome! i loved it i can play this for hours and hours
Reply
:iconscorpiob:
scorpiob Featured By Owner Aug 30, 2009
Awesome!
Reply
:icondark-dragon-wings:
dark-dragon-wings Featured By Owner Jun 28, 2007
so amusing....... *insert dribble* i love it !!!!!!!!!!

ITS ATHLINIA'S birthday.... please just stop by her DA and say hello..... its gunna be my present to her :) I wouldn’t mind either if you copied and pasted this message everywhere to please : )
Reply
:iconjellomix:
Jellomix Featured By Owner Jun 13, 2007
Wah, so small but so very amusing. :+fav:
I love the graceful touch to it.
Reply
:iconblackvine:
BlackVine Featured By Owner Jun 12, 2007
Woah. As you said, hypnotic....
Reply
:iconfalarae:
falarae Featured By Owner Jun 12, 2007  Hobbyist Digital Artist
wow...this is so awesome...and it's great of you to put the code up, too...

did you make this using Macromedia Flash?
Reply
:iconartbit:
ArtBIT Featured By Owner Jun 12, 2007  Hobbyist Digital Artist
aye...
Reply
:iconswerno092:
swerno092 Featured By Owner Mar 17, 2007
I still cant get over how awesome this is . . .
Reply
:iconartbit:
ArtBIT Featured By Owner Mar 17, 2007  Hobbyist Digital Artist
It's not that awesome... just a little line experiment...
Reply
:iconswerno092:
swerno092 Featured By Owner Mar 18, 2007
Erm mister arbit, can you tell me the speciefic types of action scripts you used , i realy dont have a clue . . .
Reply
:iconartbit:
ArtBIT Featured By Owner Mar 18, 2007  Hobbyist Digital Artist
Just an array of points with some velocities applied, and connected with lines...
Reply
:iconswerno092:
swerno092 Featured By Owner Mar 18, 2007
0.o okay erm thanks . .
Reply
:iconartbit:
ArtBIT Featured By Owner Mar 18, 2007  Hobbyist Digital Artist
Check the description of the file, I've added the basic code....
Reply
:iconswerno092:
swerno092 Featured By Owner Feb 23, 2007
Erm howd u make this? What speciefic action scripts should i use in order to make somehting like this?
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 23, 2007  Hobbyist Digital Artist
Heh, specific? Learn the basics, then ,experiment dude.
This is just an array of points, with some low gravity physics applied, and then just I draw lines between the points.

Learn arrays. They're pretty basic, yet so ultimately useful.
Reply
:iconswerno092:
swerno092 Featured By Owner Feb 23, 2007
Ok thanks, but how do u apply the physiscs theories? What action scripts do i have to use?
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 23, 2007  Hobbyist Digital Artist
You must learn to code. Not copy'n'paste the scripts...
You must learn the basics (variables, basic classes, arrays, loops, etc.), then ask for help if there's something you don't understand. You cannot just ask someone "How can I make this?"
Someone even asked me if I could do a short tutorial how to do something like my game The Atonement... I mean come on. There's over 6000 lines of code. People ask me about 5-6 lines of code and I spend 30mins explaining them how that works... I'd need to write a book to explain how to make something like that, and only the code - not everything needed for the game...
I would still need more books to write so that I could explain physics, collisions, math underneath all that.

You should learn how something works and then use it.

I gave you the links, go and learn mate. If you have any questions, jump to flashers chat...

Cheers
Reply
:iconswerno092:
swerno092 Featured By Owner Feb 23, 2007
Woah 6000 lines of codes now thats like oh dman thats so hard you must be somekinds genius dude =D
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 23, 2007  Hobbyist Digital Artist
No I'm not. That's not much. You'll see...
Reply
:iconfurryfoxcoon:
FurryFoxCoon Featured By Owner Feb 11, 2007
H h !
Nice work !
It can be also a great screensaver :)
Reply
:iconktgodstgarden:
ktgodstgarden Featured By Owner Feb 8, 2007
Pure amazement! I played with it for hours, and I wasn't on any drugs (other than nicotine and caffeine)
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 8, 2007  Hobbyist Digital Artist
Hey, hey, hey! Dude! :hug:
Long time no read! How have you been?
I hope you're doing ok...

Thanks for the visit mate... good to see you again! :)
Reply
:iconktgodstgarden:
ktgodstgarden Featured By Owner Feb 8, 2007
Yeah, I'm doing okay. I'm trying to find a job because my mother left state without me, and I don't want to keep being financal burden on my friends. Other than that, it's pretty much the same. How 'bout you?
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 8, 2007  Hobbyist Digital Artist
Damn it dude!? She left the country? Without you?!
Trying to find my place in the world, and trying to make some money...

Can I do anything to help?
Reply
:iconktgodstgarden:
ktgodstgarden Featured By Owner Feb 8, 2007
Ummm, Keep creating awesome stuff! haha! (And in the US, there are several states. She's still in the country) but I don't know where or why she left. She called a couple of my friends, but that is it. Oh well, I'm 18, and legally an adult, so I just gotta grow up and support myself now. Haha! :hug: Don't worry, I'll be okay!
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 8, 2007  Hobbyist Digital Artist
He, he... dude, I will try. Glad to see you have some positive energy in you. :hug:
Hang in there!
Reply
:iconktgodstgarden:
ktgodstgarden Featured By Owner Feb 8, 2007
Yeah, I believe that mood is an energy that can not only improve it's user, but make better the lives of those around them. If everyone thinks positively, then the world is a great place. Not that it it's not okay to express negative emotions, that is fine too. One should just keep an open mind, and a constructive out look, searching for a solution to their problems, rather than let the problem become a permeated source of continuing negativity, which in and of it's self becomes more problems. Wow, I should go back to high school, then go get my psyche degree at college. I love this stuff! lol
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 8, 2007  Hobbyist Digital Artist
lol I totally agree. Not that I'm being insanely optimistic, but life's short and I don't want to waste it on being down...
I try looking on the bright side of life cuz
"...life's a piece of shit, when you look at it
Life's a laugh and death's a joke it's true,
You'll see it's all a show,
Keep 'em laughing as you go,
Remember that the last laugh is on you...
aaaaaaand...."

:sing:
Reply
(1 Reply)
:icongreat-5:
Great-5 Featured By Owner Feb 6, 2007  Hobbyist General Artist
wow this is sooo cool!
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 6, 2007  Hobbyist Digital Artist
heh thanks
Reply
:iconsweet-mei:
sweet-Mei Featured By Owner Feb 4, 2007
Amazing! :D
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 4, 2007  Hobbyist Digital Artist
Interesting - yes, but amazing... I wouldn't go that far =D
Reply
:icongryffenclaw:
gryffenclaw Featured By Owner Jan 25, 2007
Wow... This is amazing! How do you make things like this? I would like to try and make interactive art programs too... Do you download or buy a flash program?






~~gryffenclaw
Reply
:iconartbit:
ArtBIT Featured By Owner Jan 26, 2007  Hobbyist Digital Artist
You could download a Flash 8 30 day trial version, but since this is 100% actionscript, you could use flashDevelop (a free GPL Flash IDE -> [link])
It is much much better than the Macromedia's IDE ( for actionScript that is )
It compiles more quickly, it has code hints, code folding, and more, but what is the most important - it's free ;)
Reply
:icongryffenclaw:
gryffenclaw Featured By Owner Jan 26, 2007
Ooooohhh... Free... Cool, thanks so much! By the way, I'm using a Mac, would this be a problem with flash?









~~gryffenclaw
Reply
:iconartbit:
ArtBIT Featured By Owner Jan 26, 2007  Hobbyist Digital Artist
I don't think so. Flash is platformIndependent, browserIndependent, osIndependent. Mac/PC - Mozilla/IE/Opera - OSX/Windows/Linux - you name it, all you need is a flashPlugin.

Cheers.
Reply
:icongryffenclaw:
gryffenclaw Featured By Owner Jan 26, 2007
Sweet! Thanks! :dance:









~~gryffenclaw
Reply
:iconbranjinjica:
branjinjica Featured By Owner Dec 19, 2006   Writer
Ne mogu da vjerujem. Ovo smiruje...ne mogu ti opisati koliko mi je drago sto te pronadjoh medju ovom gomilom..super je..super..
Reply
:iconartbit:
ArtBIT Featured By Owner Dec 19, 2006  Hobbyist Digital Artist
:cuddle:
Reply
:iconbranjinjica:
branjinjica Featured By Owner Dec 19, 2006   Writer
pazi da me ne ugusis:)
Reply
:iconartbit:
ArtBIT Featured By Owner Dec 19, 2006  Hobbyist Digital Artist
*daje joj slamcicu da moze da dise...*
Reply
:iconbranjinjica:
branjinjica Featured By Owner Dec 19, 2006   Writer
ahahahahahhahaahahahahhaahahahahah:)))
Hvala:)
Reply
:iconchameleonmind:
chameleonmind Featured By Owner Dec 11, 2006  Professional General Artist
Stvarno cool! Nisam znao da Flash moe da proizvede ovakav blur... :o
Reply
:iconartbit:
ArtBIT Featured By Owner Dec 12, 2006  Hobbyist Digital Artist
Da, da, i još štošta ;)
Reply
:icondina-n1:
Dina-n1 Featured By Owner Dec 7, 2006  Hobbyist Traditional Artist
awsome ..:excited:

bye bye ..:wave:
Reply
:iconartbit:
ArtBIT Featured By Owner Dec 7, 2006  Hobbyist Digital Artist
Thankies hon :hug:
Reply
:icondina-n1:
Dina-n1 Featured By Owner Dec 8, 2006  Hobbyist Traditional Artist
u're welcome dear:hug:

:wave:
Reply
:iconnattregn:
Nattregn Featured By Owner Dec 4, 2006
Quite fancy, I must say! You never fail to amuse me :#1:
Reply
:iconartbit:
ArtBIT Featured By Owner Dec 4, 2006  Hobbyist Digital Artist
Thanks hon :hug:
Reply
:iconmizra:
Mizra Featured By Owner Dec 3, 2006  Professional Digital Artist
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. ;)
Reply
Add a Comment:
 
×
Download SWC download, 4.3 KB




Details

Submitted on
November 23, 2006
Image Size
4.3 KB
Resolution
550×400
Thumb

Stats

Views
7,707 (8 today)
Favourites
117 (who?)
Comments
125
Downloads
329

License

Creative Commons License
Some rights reserved. This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 License.
×