Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 5th May 2020 19:27
Hi guys,

Anyone has a very basic example of a navmesh with an object that detects the objects around him? I am trying to create an artificial intelligence system but is missing this key component. I am at the documentation to see what's about, but in AppGameKit, the commands are that freezez me. Maybe some more experienced programmers here can give me at least some tips.

Thank you so much for your time!
www.alexmatei.com
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th May 2020 19:16
Navigation Mesh are quite an involved subject.
Are you aware of the Basics of what they are and the role they serve for AI?
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 6th May 2020 23:45
I think the navmesh is a system that detects collisions for the ai objects based on what objects are on the map
www.alexmatei.com
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 7th May 2020 00:43
Well generally speaking Navigation Mesh have very little to do with Collision., but they can be used to Optimise Collision Checklists.
In fairly basic terms...

A Navigation Mesh, is a Network of Path Nodes and Connections that allow an AI both Traverse and make decisions about said Traversal of the Map.
Beyond this you can add additional elements, such-as "Item Node Connections" that allow the AI to know what Items are nearest which Node; and Path Node Volumes so you can have Hierarchal Collision Object Lists; as these can allow you to determine the level of Priority of Interacting Objects.
As such you can either update interactions less frequently or simply ignore them as the Player will never see it.

Now as you can imagine this can dramatically reduce overhead on performing such tasks.
Pathfinding is an excellent example as, rather than using Voxel or Ray Marching to determine routes an AI can take... well they already "Know" the Map, thus can simple pick the correct route.
If you want your AI to gradually learn over time as it plays... you could combine Ray Marching with a Procedurally Generated NavMesh., so as the AI learns the map; it gains better understanding of how to Navigate and thus make more informed decisions.

Without a NavMesh for example., the AI has no way to predict where a Player is Headed... as well it doesn't know where any Items, Interaction Points, etc. are in relation to it... instead the Pathfinding is just going to find the Shortest Route to the Players "Last Known Locatoin"
Where-as with a NavMesh; it can see what Path Node the Player is in and their Direction of Travel; so then follow said Paths to determine "Likely" Destination Points.
Then make a decision (I'd recommend via Fuzzy Logic) where it thinks is most likely the Player is headed, and/or plan a new route based upon what Resources (Ammo / Weapon / Health) it thinks that IT needs.
What I'd recommend is playing with NavMesh in Unreal Engine 4., as you can manually build them with the built-in tools.

This can give you a much better and practical understanding of what they are, and what they do.
If I can find the time I'll craft an example in AppGameKit / DBP that showcases the benefits of them with AI.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 7th May 2020 00:56
I’m sorry, are you talking about this?



blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th May 2020 01:48 Edited at: 7th May 2020 01:49
I thought this was a pretty good explanation
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th May 2020 02:28
take a look at the pacman movements
Quote: " Blinky, the red ghost, chases you. Pinky, the pink ghost, simply tries to position herself in front of Pacman,
Inky, the blue ghost tries to position himself in the same way as Pinky and Clyde, the orange ghost, moves randomly."


I believe it to be one of the first true AI games and if you look perhaps at the characters in pacman ie pinky trying to position herself
in front of pacman this could be a good starter for a simplified navmesh system naturally it would require alsorts of raytracing
for a 3d game that's not setup like pacman and may need locations on the map it tries to work towards depending on which is
closer to the player. And for some programs may need to check for getting stuck etc but I still believe pacman would be a good
starter if you plan on creating a navmesh system

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 14th May 2020 20:26
Hi guys, I see your point, I red about it, yeah, is a lot to digest.

Qugurun:

Something like that but only in 3D.

Do I have to gain access to objects's vertexes?
www.alexmatei.com
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 16th May 2020 15:14
Little bump
www.alexmatei.com
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 16th May 2020 23:52 Edited at: 16th May 2020 23:53
Quote: "Do I have to gain access to objects's vertexes?"

No you don't.
How you create your mesh/graph is absolutely up to you wether you do it with raycast, collision detection, checking vertices or just maually set the corner points, which you may want to call vertices as they are in a 3D coordinate system.
So creating the navmesh is up to you, but important is to know why you need one or better which kind of mesh you need.
There is an super awesome site, I learned from yeahrs ago, too, which explains all you need:
https://www.redblobgames.com/pathfinding/grids/graphs.html
To make a working Navigation algorithm you want to start with A* first though.
There are a bunch of neat A* algorithms for grid based grapth on the forums, I think there is one I made too.
But that RedBlob site also have you covered there, and I feel you don't need any previous knowledge.
https://www.redblobgames.com/pathfinding/a-star/introduction.html
Then you need to stiching them together
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 20th May 2020 22:49
I understand.

Anyone got an example, please?

Thank you!
www.alexmatei.com

Login to post a reply

Server time is: 2024-04-19 06:51:38
Your offset time is: 2024-04-19 06:51:38