Not sure where to post this.
I’m currently a university student playing around with Unity in my free time. I’m currently researching movement-based pathfinding algorithms, I’ve created a couple, none that are extraordinarily good but functional including a*, flow fields and multithreading. However there’s this one screenshot I saw a while ago that I can’t replicate at all, I believe they’re using flow fields, and I messaged them to ask but no response.
Any advice on how to replicate something like this would be highly appreciated, it’s driving me crazy and I can’t wrap my head around it. The main parts I’m focused on are the movement, the way there’s a signifier to tell the numerous units inside to move, and that once they reach the spot they kind of wander around inside. It’s such a great looking/feeling mechanic, again anything would be appreciated, thanks.
Is there even any pathfinding? Because there are no obstacles. Could be something similar to boids, except that critters move in hops.
Basically, with boids you have multiple vectors defining where an object wants to “go”. “vector towards target”, “vector away from nearby object”. Those are summarized and together determine where the object actually moves.
Ah!
You might be right, I’ve actually toyed around with boids before and have always imagined them in a 3D fish floating capacity with randomised movements, never thought about adding gravity and a potential goal for them to manoeuvre towards. Might try that out, thanks.
I’m a bit curious why you listed multithreading in a list of algorithms when it’s more of an implementation detail than an actual algorithm unless you meant you took those and added multithreading to them.
For the record, this actually works for crowd/horde movement, as long as physics system can handle amount of queries necessary to find nearest neighbors to avoid.
Basically an individual agent would have multiple “encouragement” vectors to keep distance away from nearby friends, and another vector towards target. This can be combined with pathfinding, because vector towards target can be calculated by pathfinder.
In practice it allows you to have a blob/horde of enemies that wants to go into the same spot, but do not get stuck.
In the example you provided, the only difference from pure boids likely is that the movement happens when length of summarized “Desired movement” vector goes beyond some threshold. Then the critter does a hop.
I’ve mixed A* and Boids/Flow Fields to try capture what they’ve done as well as meddle with some other techniques, its somewhat similar but so horribly optimised that there’s no way it’ll work. There must be a different way he and Bad North did it, I’m not sure.
Either way, I appreciate the help but I can’t figure it out, Bad North developer released a very brief tech description but they left out like 90% of the magic, either way still an interesting read. https://twitter.com/i/events/1065556549542846464?lang=en