How to change AI Navigation in game

Started by
4 comments, last by GNPA 4 years, 8 months ago

Hello everyone! I've implemented some simple mechanics in my game, but faced not so simple problem. Is there are any ways to change AI navigation with events in the game (for example when you hit a switch). The problem can be clearly seen on the bridge example on the screenshots below. When bridge disappear enemies still trying to use the navigation which leads to their fall. I've made bridge disappearing by switching the material and setting no collision on it. I've placed bridge in the editor activated and it generated navigation. But how to get rid of it and change it, for example, with nav link I don't know. And also how to turn navigation back when the bridge is active?

 

Here we got bridge and we got navigation for it.

image_171117.thumb.png.103edc3d67a479a3c08661b73a301c6f.pngimage_171118.thumb.png.dfba2f3035a76be2afddecb814de116b.png

 

 

Here we don't got bridge, but still have navigation for it.

1103057767_image_171116(1).thumb.png.50c4a8294477fd2ebeb3348b8beb7c42.pngimage_171119.thumb.png.9e67926e5ed0d4b9abca0951c7da48d4.png

 

Advertisement

Realtime navmesh generation.  You should probably check it out.

I am an indie game developer who enjoys pixel art games.

Thanks, I've checked it and it works fine. But now I've got another question. The point is that I got pretty big map and it's got only one navigation volume. So is it ok to use runtime navmesh generation with one big navmesh volume or I should better divide it into smaller chunks?

chunks.  Have stationary pathfinding volume for areas that don't change, and only update the navmesh volumes that are affected by the object for a really high-performance increase.

I am an indie game developer who enjoys pixel art games.

Alternatives are influence maps:
https://forum.unity.com/threads/ai-influence-maps.145368/
http://gameschoolgems.blogspot.com/2009/12/influence-maps-i.html

Influence maps with pathfinders:
https://www.hindawi.com/journals/ijcgt/2018/5184605/
https://www.cs.rutgers.edu/~mk1353/projects-constraint-aware-navigation.html

Two search graphs one of low level and one of highlevel.

On 8/22/2019 at 8:40 AM, G-Dot said:

Thanks, I've checked it and it works fine. But now I've got another question. The point is that I got pretty big map and it's got only one navigation volume. So is it ok to use runtime navmesh generation with one big navmesh volume or I should better divide it into smaller chunks?

You could also, divide the navmesh per game region and only operate among a certain subset of the navmesh if connectivity in ensured.

This topic is closed to new replies.

Advertisement