AI improvements

Talk about anything related to Unvanquished.
Post Reply
User avatar
killing time
Programmer
Posts: 162
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: AI improvements

Post by killing time »

jump when you are on a small navmesh (that's already the case, but is too slow to trigger): it means you are on a box or in a hole

Bots try to jump away when they have stayed within a small radius of an origin point for a long period of time. But adding something to detect small navmeshes could indeed make the situation better. Maybe connected components with a very small of nodes could be deleted from the navmesh, either in the navmesh generator or at navmesh load time.

User avatar
illwieckz
Project Head
Posts: 717
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: AI improvements

Post by illwieckz »

killing time wrote:

jump when you are on a small navmesh (that's already the case, but is too slow to trigger): it means you are on a box or in a hole

Bots try to jump away when they have stayed within a small radius of an origin point for a long period of time. But adding something to detect small navmeshes could indeed make the situation better. Maybe connected components with a very small of nodes could be deleted from the navmesh, either in the navmesh generator or at navmesh load time.

If we manage to remove small navmeshes at generation time, do the alien will be stuck? If yes the existing escape code would be triggered, and then, problem solved without adding specific game code.

On the other hand detecting small navmeshes in game to trigger the escape code without delay would be better.

This comment is licensed under cc ​​by 4 and antecedent.

User avatar
killing time
Programmer
Posts: 162
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: AI improvements

Post by killing time »

I'm sure that the great majority of cases of bots getting stuck are due to deficiencies in the navmesh. I let marauder bots play for a few minutes on parpax and observed them getting stuck in two places visible in this screenshot below: atop the spherical structure on the left, and on the group of three boxes on the right. In both cases, the navmesh at least visually appears to be disconnected. This is not always the case though; in another room a bot got stuck in a place where the mesh was not visually disconnected.

Image

However, I'm not sure about the fidelity of this visual representation of the navmesh (displayed by navedit enable level2); there is no guarantee that the apparent disconnection exists in the internal graph representation.

Places where bots can be stuck without navmesh deficiencies also exist. For example, exiting from the depicted human base to the right, there are some shallow holes which human bots can fall into.

I do believe that deleting the bad parts of the navmesh would help the problem. I think there is code for bots to try to get back onto the navmesh when they are off it. Unfortunately, in the presence of deficiencies this can make things worse: I've seen bots deliberately going back to the disconnected part of the mash after they have managed to get off it using the unstick procedure.

Post Reply