Results 1 to 8 of 8

Thread: Boids - Simulating the flocking behaviour of birds

  1. #1

    Thread Starter
    Member
    Join Date
    May 2012
    Posts
    57

    Red face Boids - Simulating the flocking behaviour of birds

    I'd like to share my attempt to re-create the boid behavior program in vb.net.

    More info about this can be found on wiki:
    http://en.wikipedia.org/wiki/Boids




    The boids behave by using so called "rules"

    Primairy rules:
    • Separation: steer to avoid crowding local flockmates
    • Alignment: steer towards the average heading of local flockmates
    • Cohesion: steer to move toward the average position (center of mass) of local flockmates


    Additional rules:
    • Speed limit: pretty self explanatory
    • Border: don't go beyond the borders
    • Wind direction: move with a current influenced direction
    • Mouse Interaction: avoid mouse position


    Download source: Boids.zip

  2. #2
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    283

    Re: Boids - Simulating the flocking behaviour of birds

    Did you create this with Visual Basic 2013? I use Visual Basic 2010. Can't get it to work.

  3. #3

    Thread Starter
    Member
    Join Date
    May 2012
    Posts
    57

    Re: Boids - Simulating the flocking behaviour of birds

    Quote Originally Posted by Peter Porter View Post
    Did you create this with Visual Basic 2013? I use Visual Basic 2010. Can't get it to work.
    Yes i did, never converted project files in vs, however it seems pretty easy actually if you read the following thread:

    http://stackoverflow.com/questions/2...l-studios-2010

    Else i suggest you include the seperate vb files and form in your project, might be a bit ugly but should work if done correctly.

  4. #4
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    283

    Re: Boids - Simulating the flocking behaviour of birds

    I've tried that trick, also tweaking the app.config and Boids.vbproj file, but nothing.

    I'm just gonna code this from scratch. Thanks anyway!

  5. #5

    Thread Starter
    Member
    Join Date
    May 2012
    Posts
    57

    Re: Boids - Simulating the flocking behaviour of birds

    Quote Originally Posted by Peter Porter View Post
    I've tried that trick, also tweaking the app.config and Boids.vbproj file, but nothing.

    I'm just gonna code this from scratch. Thanks anyway!
    Well u can open indiviual vb files ofc and port it to 2010.

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,685

    Re: Boids - Simulating the flocking behaviour of birds

    Quote Originally Posted by Peter Porter View Post
    I've tried that trick, also tweaking the app.config and Boids.vbproj file, but nothing.

    I'm just gonna code this from scratch. Thanks anyway!
    Here, I converted it to VS2010. Note that I had to make some changes. VB2010 was refusing to compile the Rnd overloads in Utils.vb so I had to remove the Optional modifier on these methods for it to compile.
    Attached Files Attached Files
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  7. #7
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    283

    Re: Boids - Simulating the flocking behaviour of birds

    Thanks, Niya! Excellent program, TheBarret!

    Still gonna try to code this on my own without cheating.

  8. #8

    Thread Starter
    Member
    Join Date
    May 2012
    Posts
    57

    Re: Boids - Simulating the flocking behaviour of birds

    Quote Originally Posted by Peter Porter View Post
    Thanks, Niya! Excellent program, TheBarret!

    Still gonna try to code this on my own without cheating.
    Sure thing mate ^^ i hope you succeed in your project (little advice, the vector2.vb is quite usefull)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width