[behavior] rex_boids

Post your completed addons to share with the community

Post » Mon Mar 16, 2015 10:42 am

Update:

Try to add obstacles avoidance.
Demo, capx
It uses separation term of boids behavior to make obstacles avoidance.
B
107
S
25
G
230
Posts: 4,353
Reputation: 130,894

Post » Mon Mar 16, 2015 11:21 am

Looking forward to the results :)
Who dares wins
B
55
S
15
G
15
Posts: 1,831
Reputation: 16,238

Post » Mon Mar 16, 2015 12:50 pm

Great, this one will be very useful. Will it be possible to set TargetX/Y for individual instances?
B
45
S
11
G
4
Posts: 515
Reputation: 7,389

Post » Mon Mar 16, 2015 12:56 pm

xoros wrote:Great, this one will be very useful. Will it be possible to set TargetX/Y for individual instances?


It might put dummy sprites instead of set position and angle by action of this behavior. Did I get your requirement?
B
107
S
25
G
230
Posts: 4,353
Reputation: 130,894

Post » Mon Mar 16, 2015 1:07 pm

Not sure if the old one had it, but it would be nice if you could dynamically set the distances .

Like having the units spread out wider by an X's radius, something like a scatter, but still following, effect.
Who dares wins
B
55
S
15
G
15
Posts: 1,831
Reputation: 16,238

Post » Mon Mar 16, 2015 1:23 pm

Also, it would be great to use this plugin just as collision avoidance behavior only, without flocking.
B
45
S
11
G
4
Posts: 515
Reputation: 7,389

Post » Mon Mar 16, 2015 2:59 pm

@lennaert

Instances which would affect this boids behavior is picked by line of sight in my default plan. So the range and the radius could be assigned at runtime.
B
107
S
25
G
230
Posts: 4,353
Reputation: 130,894

Post » Mon Mar 16, 2015 3:23 pm

Sounds promising Rex :)
Who dares wins
B
55
S
15
G
15
Posts: 1,831
Reputation: 16,238

Post » Mon Mar 16, 2015 3:23 pm

@xoros

In my understand, the logic of sprite would be separated into 2 levels.
Bottom level is the moving behavior or other appearance behaviors, to set the position/angle/opacity/... of this sprite. This level would export some commands like turn left/turn right/accelerate/brake for top level.
Top level is the controller, it would fire these commands by human input, or fire by logic (NPC/AI). This AI logic might be
Code: Select all
if ( some_conditions )
    fire_command

Boids and LJ potential would provide some values for condition checking, They would not set properties (position/angle) of this sprite directly.

Back to "collision avoidance behavior", it might be another kind of moving behavior since it needs set the position directly to become "collision avoidance". So it would be another behavior.
In above boids demo, sprite would try not too closed to the obstacles by some logic, but it might not "collision avoidance" for all cases without adjust any term of the controller logic.
B
107
S
25
G
230
Posts: 4,353
Reputation: 130,894

Post » Mon Mar 16, 2015 3:46 pm

@lennaert

Here is a snapshot of demo capx
Image

Code: Select all
F.Call( "SetLOS", F.Param(0) , 100, 180)
would set the range and cone of view to 100 pixels and 180 degrees. Then pick instances by LOS behavior. Do cohesion/alignment/separation in actions.
B
107
S
25
G
230
Posts: 4,353
Reputation: 130,894

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests