Boids tests

Show us your completed creations made in Construct 2

Post » Wed Nov 14, 2012 7:15 am

Yes, boids, they are used for simulating flocks of birds or movement of groups.

Here is my reference:
http://www.kfish.org/boids/pseudocode.html

First attempt:
I basically used the same format as the ref. I think I made a math typo in it somewhere, it's a bit unstable in spots.
https://www.dropbox.com/s/lyolk1o1lzap0 ... .capx?dl=0

2nd:
This is a rewrite from scratch in a typical event fashion. Only eight events and I seem to have fixed the math so its a bit more stable.
https://www.dropbox.com/s/oaybpue9w88yd ... .capx?dl=0

3rd:
This rewrite is based on the idea that it would be cool if vector math could be done directly and not have to do the formulas with the components of the vectors. The result was a lot of the math was hidden in a bunch of reusable vector functions. All the function.calls in the expression kind of counteracted the simplifying of expressions I was going for. Not to mention that it's a bit more tedious writing expressions with my system because errors are just ignored.
https://www.dropbox.com/s/rpqmyaypsxo4u ... .capx?dl=0
Last edited by R0J0hound on Wed Mar 22, 2017 10:19 pm, edited 1 time in total.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Wed Nov 14, 2012 1:17 pm

thank you for this

nice
B
32
S
6
G
4
Posts: 108
Reputation: 5,642

Post » Wed Nov 14, 2012 1:35 pm

Nice! This is weird, I was wondering if it would be possible to implement the boids algorithm in C2 just this morning when I was feeding the fish. And here it is.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,680

Post » Tue May 27, 2014 10:21 am

R0J0hound thanks I was looking for something like this. You are star Thanks again
B
257
S
43
G
15
Posts: 1,992
Reputation: 41,535

Post » Tue May 27, 2014 12:19 pm

looks super!
3rd example is beyond me... :(
B
31
S
13
G
2
Posts: 752
Reputation: 5,541

Post » Tue May 27, 2014 2:19 pm

Someone wrote a plugin a while ago: viewtopic.php?t=77775&start=0
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Post » Thu Jan 08, 2015 4:23 pm

Boids are awesome.. wait those sample was started in 2012 ? Favor an update then :)
ImageImage
B
115
S
51
G
24
Posts: 790
Reputation: 23,505

Post » Wed Mar 22, 2017 9:53 pm

Hey guys.. Im new here. Can anybody help me to find those files? the links are down. Or the plugin of Boid. Sorry about my english :p
B
7
S
2
Posts: 2
Reputation: 479

Post » Wed Mar 22, 2017 10:19 pm

Links updated.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Fri Apr 28, 2017 5:49 am

Wow, awesome @R0J0hound I was looking for this for a long time until someone recommended me the Boids Flocking behaivor and just realize today that it will not work on C3 and the developer of that plugin it's been inactive for many years so I'm so glad that I found this, will be really helpful. Are you planning to make a plugin? will be awesome.

The option two I see is the most simple to try to comprehend as my knowledge is not that good: I will study it see If I can understand it.

I have two questions about the second option Capx:

-How can I include the sizes of the objects into account? example, when I mixed up the instances with different sizes, the big ones overlaps all the small ones. seems like it works only if all the objects are in the same size.

-How can I just stop them from overlapping only when they are near? example when I drag one object far from the group, it comes back to the group instantly like its lerp to them, can they not be freely moved and only avoid when they are near to the other objects?

Thank you so much
B
41
S
25
G
87
Posts: 309
Reputation: 48,096

Next

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 7 guests