top | item 44077491

(no title)

vimgrinder | 9 months ago

dies in the sense machine gets hung or all boids vanish?

EDIT: also pushed some fixes in params (allow offsprings at larger distance, etc), but basically if the boids don't end up closer, they won't reproduce and the population dies so play with that and lmk

discuss

order

diggan|9 months ago

Noticed that all the boids lifetime seems to be the same, so you go from "a flock" to "nothing" very quickly if the lifetime been hit. What I've done before with "crowd simulations" like these, is add another params, something like "random lifetime interval" where if set to say 100, it'll set the actual lifetime to be randomly chosen between $LIFETIME - 100 and $LIFETIME + 100, so things die a bit less predictable. Helps stabilize the simulations too when you're doing reproduction too.

vimgrinder|9 months ago

yes had the same idea but applied that by doing randomization in age: floor(random(0, this.lifespan))

for me its not vanishing suddenly, so not sure how to reproduce now