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

Just pre-compute everything. Put your vector fields in textures at map design time and be done with it. No point in overthinking this once its a simple lookup per frame.

The real fun is designing the agent's AI: exploration, avoidance, engagement ;)

Crowd Pathfinding And Steering Using Flow Field Tiles

http://www.gameaipro.com/GameAIPro/GameAIPro_Chapter23_Crowd...

Flow Field Pathfinding Tutorial

http://leifnode.com/2013/12/flow-field-pathfinding/



> Put your vector fields in textures at map design time and be done with it.

I think you're forgetting there is no map design time in Age of Empires since the maps are RNG. Also, walls, structures, and destroyed forests are critical to gameplay, so it has to be an extremely dynamic process.

There are obviously ways to improve the pathfinding, https://github.com/SFTtech/openage has many plans, but your dismissals are starting from wrong assumptions.


Don't be so dismissive. The point wasn't solving it perfectly, but to mimic the old behavior while avoiding certain bugs/things that made it less enjoyable.

And for AoE you cannot precompute everything. Things you have to tackle:

- Walls being built or torn down

- Trees being chopped down, gold being mined

- Units moving as a single group, not bumping into each other, not creating a dead lock when entering a narrow passage

- Units of various sizes (ram vs. villager)


> Put your vector fields in textures at map design time

This would not have been a great solution on the original AoE's 16MB target memory.


I have invented and implemented very similar idea, and published an article about it along with source code, many years before that book and that article you’ve linked.

http://const.me/articles/robocalypse-pathfinding/




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

Search: