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

This technique won't work if your player has teleport abilities like sorcerer in Diablo 2 or Assassin in GuildWars. In those case, you can teleport quite some distance and enemies in a 3D environment will get stuck on a upper slope while a simple path algorithm will make them still chase you.


Well, teleporting is a tough problem to solve to begin with. One way to solve it is to have enemies distributed uniformly and restrict their movement to subsections. Once the player teleports, only the enemies in the closest subsections will use the algorithm to reach the player.


You could use a traditional path finding algorithm, letting the mobs look around confused while the path is computed.




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

Search: