[behavior] rex_boids

Post your completed addons to share with the community

Post » Mon Mar 16, 2015 4:26 pm

Interesting

I am thinking this is for a single flock per object type, right ?

If so, perhaps an idea to add some form of grouping per object/family ?

for instance, 10 instances of object bird, 5 of them belong to flock group A, the other 5 in flock group B etc

btw the demo requires touch wrap and drag vetctor
Who dares wins
B
50
S
10
G
10
Posts: 1,728
Reputation: 12,867

Post » Mon Mar 16, 2015 4:43 pm

@lennaert

It might be grouped by additional picking conditions.

I would add another more basic sample capx while released.
B
99
S
22
G
192
Posts: 4,176
Reputation: 111,215

Post » Mon Mar 16, 2015 4:57 pm

If grouping is applied, then this could work really well for strategy games troops movements.

I would imagine in game:
Selection rectangle selecting a set of units, click destination x,y, and off the group goes.

Expanding on that idea, :) formations :D single line, delta, block etc ^_^
Who dares wins
B
50
S
10
G
10
Posts: 1,728
Reputation: 12,867

Post » Tue Mar 17, 2015 2:34 am

@lennaert

I am not sure how to combine pathfinding with boids behavior. I might think about that later.
B
99
S
22
G
192
Posts: 4,176
Reputation: 111,215

Post » Tue Mar 17, 2015 4:16 am

@xoros

Uh, I understood. I would add action to apply steer force directly toward position or direction.
B
99
S
22
G
192
Posts: 4,176
Reputation: 111,215

Post » Tue Mar 17, 2015 8:06 am

Great!
B
42
S
11
G
4
Posts: 506
Reputation: 7,269

Post » Tue Mar 17, 2015 10:35 am

rexrainbow wrote:@lennaert

I am not sure how to combine pathfinding with boids behavior. I might think about that later.



Cool.

Perhaps they can play "follow the leader" Like, the closest to destination leads, and the rest flocks behind it.
Who dares wins
B
50
S
10
G
10
Posts: 1,728
Reputation: 12,867

Post » Tue Mar 17, 2015 3:58 pm

Update

Update demo.
- Click to put feed (green box). Bird which found feed would try to eat it. ( action: Apply force toward position )
- Bird would avoid purple box. ( action: Separation )
- Bird would do flocking if it had not found any feed. ( action: Cohesion, action: Alignment, action; Separation )

This behavior had almost done. I would write document later.
Last edited by rexrainbow on Wed Mar 18, 2015 3:16 am, edited 2 times in total.
B
99
S
22
G
192
Posts: 4,176
Reputation: 111,215

Post » Tue Mar 17, 2015 4:55 pm

Slick there Rex :)
Who dares wins
B
50
S
10
G
10
Posts: 1,728
Reputation: 12,867

Post » Tue Mar 17, 2015 5:50 pm

@rexrainbow
I am so glaad to se your work!!!! :D

rexrainbow wrote:I am not sure how to combine pathfinding with boids behavior. I might think about that later.


I was thinking this way:
on selected (like in rts games, by bounding box) create invisible dummy sprite that boids follow and that dummy sprite moves by pathfinding... when he reaches the destination it gets destroyed and boids are on their own again.
When i have boids in mind i usualy think of them as squad of soldiers in RTS :)

One thing iw noticed is that if i click several times and boids bunch up they behave strange... like jittery movement and jumping positions from time to time.
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: randomly and 1 guest