General algorithm question

Zearin

Larva
Do you use a variant of the Craig Reynolds “Boids” algorithm in EOTU?

In general, what tweaks did you make to the base algorithm?

(If not Boids, is there a similarly well-known algorithm you use? What tweaks did you make to it?)
 

MikeSlugDisco

Community Manager
Staff member
Community Manager
I don't think boids is used at all, but some of the behaviour might mimic it - the pathfinding algorithm is a mixture of mostly jump point with some A*, and the general behaviour of the ants is a mix of several homebrew systems - I don't think you could call all that a single algorithm.

I know the ants have some simple parameters like "avoidance" and obviously speed; I'll see if Liam can pop into this thread at some point - he'll certainly have more insight than I do.
 
Last edited:

Liam

Administrator
Staff member
Developer of EotU
Do you use a variant of the Craig Reynolds “Boids” algorithm in EOTU?

In general, what tweaks did you make to the base algorithm?

(If not Boids, is there a similarly well-known algorithm you use? What tweaks did you make to it?)

You could say it uses Boids but without the Cohesion and Alignment steps (I don't think that still counts as Boids though). Each ant has its own path which it is always trying to stick to, and there's a Separation step where it tries to avoid other ants. That's the main bit which works fine in large open areas where there are no enemies. As soon as there are walls to squeeze past, or enemies to reach, their behaviours change. It would be a lot easier if they did not collide with each other as they could just be allowed to pass through one another at choke points but it doesn't look very natural. Especially to get a nice wrapping surround on an enemy/enemies, the ants need to block one another.

There is some randomness thrown in to make them appear more natural but it's designed to even out to keep it fair. For example, you might see an ant speed up by 10% for 2 seconds, but then it would slow down for say 20% for 1 second so it gets to its destination as if its speed was constant.
 
Top