MOSREDNA's avatar

Boids

42 23 5K (1 Today)
By MOSREDNA   |   
Published:
© 2007 - 2020 MOSREDNA
Info about boids -> [link]

"Boids, developed by Craig Reynolds in 1986, is an artificial life program, simulating the flocking behaviour of birds."

This is an improved actionscript 3.0 version of my 'flashy swarm' deviation !! [link]

it's faster .... more buttons and sliders .... more particles !!!! ;)


you can adjust the following parameters :

  • Center : how much the boids want to go to the center of the surrounding boids ...

  • Avoidance: how much the boids don't want to collide with other boids ...

  • Velocity : how much the boids want to match the velocity of the surrounding boids ...


  • Sight: how far away a boid can see ...

  • radius: how close boids can be to each other ...

  • intelligence: memory of a boid ...


  • Border : on/off

  • Hunter : on/off

  • Boids : Number of particles ...

  • Reset : Resets do default settings ...


  • You can also use your mouse to play with the boids ....

    !Warning ! when you have 1000 boids .... don't adjust the intelligence slider !! ;)

    If it doesn't work ... you might need to download the newest flash-player [link]

    I hope you like it !!
    Image size
    800x500px 19.86 KB
    Comments23
    anonymous's avatar
    Join the community to add your comment. Already a deviant? Log In
    axlfree's avatar
    Such a great job! I am new in ac3 and i really want to learn it so i might ask if you can share the script or the .fla of this project. It will mean a lot. Thanks in advance!
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    I don't have the code anymore I think... And if you are just starting with as3 this might be a bit to much too start with ;)
    anyways ... I used this site to learn about the algorithm and pseudo code . I first wrote it in as3 and then optimized it. hope it helps :)
    www.kfish.org/boids/pseudocode…
    DrJest's avatar
    DrJestHobbyist Digital Artist
    Very cool! The only point where the programming breaks down is when you hold your mouse still and they catch up. The 'flocking' algorithm doesn't handle that well. They circle and run into each other. I'm not sure what the proper response to that should be. Possibly flying off as a group and re-targeting the courser. I'm a horrible programmer, so I don't know how much work that is, and (of course) it's just my opinion.
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    When the distance between a particle and the mouse is smaller then 100 pixels the got ttowards the mouse ... when the distance is less then 50 pixels they go away ... so they are kinda trapped when close to the mouse ... it's not that hard to change that behavior :)
    Lostindamnation's avatar
    Very cool, especially in context to its purpose.

    However, I did chuckle when I noticed that "Intelligence" was spelled "Intelegence."
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    Lol :lol: ... fixed it :)
    olofmoleman's avatar
    olofmoleman Digital Artist
    This is fucking awesome.
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    :thanks:
    RawrReepicheep's avatar
    That's really cool. I like the hunter thing. xD
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    Yes ... that hunter is a real bad ass :p
    RawrReepicheep's avatar
    Hahaha yeah. I watched it for like 10 mins.
    kayceeus's avatar
    kayceeusHobbyist Digital Artist
    That is very cool, I bet it'd look great put to music.
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    Yes ... i thought of that too !

    it might be an option in the next update ;)
    kayceeus's avatar
    kayceeusHobbyist Digital Artist
    Yes please!! :excited:
    Ellygator's avatar
    EllygatorHobbyist General Artist
    That's amazing, I love their fluid interactions when they meet and to see what components steer their behavior.
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    Glad you like it !!

    those behavior things really interest me :)
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    :thanks:
    martybell's avatar
    martybellHobbyist Photographer
    i could play with that all day!!
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    Me too :XD:
    Ladic's avatar
    Wow. Nice concept. It is very soothing.
    MOSREDNA's avatar
    MOSREDNAHobbyist Photographer
    Thanks !
    anonymous's avatar
    Join the community to add your comment. Already a deviant? Log In