News for hackers. Stuff that matters.
Re:Enemy AI: chasing a player without Navigation2D or A* pat... by simias on Sunday April 12, 2020 @12:45PM (#22849370)
You might be able to achieve something like that by storing not only the position of the player in the "scent" but also its direction and speed. Then you can simulate this ghost image of the player that moves linearly in this direction and that the enemy targets.

Of course at this point you probably end up with something that's actually more CPU-intensive than a naive A* so it can't be used as an optimization. I think the cleverness of TFA is that it combines both a performance optimization and makes the enemies look smarter than omniscient bots doing A* perfectly every time.

There are no comments on this comment yet.