Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is one of the main issues in attempting to build a game like the Total War series.

When you start getting into 10,000 unit formations that need to pivot or strafe, while moving around or through other unit groups and obstacles, A* starts being rather challenging.

Trying to get 100,000 horses to ford a river reasonably when there's only a relatively small zone of safety can be tough to program.

Also, mipmaps towards the hierarchical comment of aappleby and hwillis.



TBH running a full A* for each soldier is not only waistfull but also not realistic. Most people are just moving with the group and might not even know where the entire formation is going


Isn’t the standard solution there to pick one of the horses to do the full path while telling the others “try to move along this path, if not possible then as close as possible, otherwise in the average direction of this group of horses” or something similar?


Yeah, I'd imagine you'd always split this into two separate problems of pathfinding and crowd simulation. Making thousands of separate calls to a pathfinding algorithm that returns the same path (or very close to it) would be mayhem for a game like Total War. Would be super interesting to read through some of the original source for that from Total War.

Short video on a basic sort of crowd simulation would work in Unity: https://learn.unity.com/tutorial/moving-as-one


> Trying to get 100,000 horses to ford a river reasonably when there's only a relatively small zone of safety can be tough to program.

I imagine this is also very tough in real life




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: