[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4771: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3906)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4773: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3906)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4774: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3906)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4775: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3906)
Skyline Forums • View topic - Get navmesh Corners
Help with your scripting

Get navmesh Corners

Get navmesh Corners

Postby epsilonion » 10 Feb 2018, 13:36

Is there a way to navmesh data?

I.e. get navmesh concave so you can get the npc to lean in and fire, the NPC would know that there is an object at a location because of the navmesh data and will know where corners are so it can lean while firing and stay in cover..

There are many many uses for Navmesh data in AI related programming and it gives you more precise control and positioning while seeking out cover than other methods (and the least time consuming) so much better then manually placing cover objects in a scene and getting the npc to position correctly on the corner.

You can use the Navmesh data with other flags/data on objects in a scene to let the NPC know its a small wall or a object that it can not fire over, overall its about getting the NPC positioning correctly.

This is the preferred method of most AAA and serious game makers.. :)

:D
Skyline Help:

User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Get navmesh Corners

Postby StarFire » 10 Feb 2018, 14:00

ue4 uses a playable cover box which you place when the cover system should kick in.

Raycasts can give you the info you need by detecting distance to the wall and wall end for lean out. Think of cats whiskers; 2 raycasts would do it.

But certainly we will see if there is a better approach ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Get navmesh Corners

Postby SpiderMack » 11 Feb 2018, 01:04

User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Get navmesh Corners

Postby epsilonion » 11 Feb 2018, 12:05

I am thinking of the least resource expensive way to implement cover and concealment behaviour in an AI.
Adding data to a huge number of objects in a 20km x 20km map could have a real performance decrease if you have it on trees, bushes of concealment, houses, rocks etc etc.

The thing is this is not Unity or UE4 with a massive community..

The way I have in mind would be:

AI goes in to alert mode, finds concave navmesh (knows that there is an object) in its immediate vicinity (say 20 meters), ray cast to find height of said objects that has cause the navmesh to go around the objects to see what stance it needs to preform to stay in cover.

Another implementation would be to find the best path to set way points to flank the player.

Closer the objects the more concealment you have and finding this via the namesh rather than having a load of preset boxes telling them that there is cover there.

If in alert state and not combat state then find concealment (this is the tricky part that does not involve the navmesh and not really relevant to this topic.


The most of the information is already there with the navmesh data and as stated by SF above you will have to use raycasts to find the height etc, these two usually go hand in hand when creating a cover based AI system.

I have already put behaviour trees together for ammo collection via the lowest priority member in a squad that will go to a supply point and fill the back pack up with ammo and bandages for his/her squad mates.. :) the setting way points was the easiest part of the system but finding cover as he/she goes to resupply is the problem and finding the least resource expensive way of doing so, its like reinventing the wheel when most of the data is already there. lol..

I have more ideas like AI creating ambush points and more. creating there own squads if in alert mode and others are close by in alert mode.

Ai puts other AI in alert mode that are close to them and not in alert mode.


This is a great resource
Skyline Help:

User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Get navmesh Corners

Postby SpiderMack » 11 Feb 2018, 16:24

Last edited by SpiderMack on 11 Feb 2018, 18:01, edited 1 time in total.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Get navmesh Corners

Postby SolarPortal » 11 Feb 2018, 17:54

Very useful information, thanks :D



Twitter:
Instagram:
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Get navmesh Corners

Postby SpiderMack » 11 Feb 2018, 18:16

User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Get navmesh Corners

Postby epsilonion » 12 Feb 2018, 18:57

Thank you very much for the information... This will help me in my project... :P
When I say behaviour tree I dont mean a implemented program to do it for me I mean writing my own.. :P
Skyline Help:

User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Get navmesh Corners

Postby SpiderMack » 12 Feb 2018, 21:23

User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Get navmesh Corners

Postby SolarPortal » 12 Feb 2018, 22:14

Attachments
Clipboard Image (1).jpg
Clipboard Image (1).jpg (7.54 KiB) Viewed 56740 times
Clipboard Image.jpg
Clipboard Image.jpg (6.13 KiB) Viewed 56740 times



Twitter:
Instagram:
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Get navmesh Corners

Postby SpiderMack » 12 Feb 2018, 23:15

Thank you, this is some great scripts documentation that could be on official docs :)

About Behaviour Tree using text data, i was thinking about Lua libraries, not Lua files used by other game objects.

This could be related to Classes the BT would instantiate at initialisation because those would be needed.
For example :
- CharacterDetection Class with detection functions
- CharacterMovement Class with movement and animation functions

The main Lua script would work like some BT , able to do branching, conditions tests and call nodes actions.
Those node actions would be some Lua common libraries or functions.

I don't think it's something for Lua, but something doable with a language supporting real Classes system.

Perhaps the best way to emulate BT is perhaps using graph system, if we can create our own complex node graphs.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Get navmesh Corners

Postby SolarPortal » 12 Feb 2018, 23:42




Twitter:
Instagram:
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Get navmesh Corners

Postby SpiderMack » 12 Feb 2018, 23:51

User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Get navmesh Corners

Postby SolarPortal » 13 Feb 2018, 00:10

yes, it is possible to design your own modules. In the module graph there is a custom tab on the toolbox of modules, these are where your modules go. You place your module in the graph, double click it to open to the next level down..

i think the only which doesnt work with them is the inputs and outputs, but this should be doable inside. StarFire knows this system the best and will be able to give a better explanation :)



Twitter:
Instagram:
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Get navmesh Corners

Postby epsilonion » 13 Feb 2018, 00:39

It was this article that got me interested in creating my own and then reading the mass of knowledge on the internet about how others do it but use other software to do it all for them that got me thinking why not do it yourself.

It is well doable in lua script within skyline, especially when using a lua stack as the article explains later down the page that I thought hey this is really interesting stuff and opens you up to all sorts of thinking about I could do this and that, it is easy to think too broadly about things and get buried and that's when planning comes into effect and documenting before you start.

I am so glad I started this topic, its kicking the old brain cell and starting it working again. There is so much information in here it's where to start lol I want to do it all lol...
Skyline Help:

User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Get navmesh Corners

Postby SpiderMack » 13 Feb 2018, 11:54

User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Get navmesh Corners

Postby Shando » 13 Feb 2018, 12:36

:!: Hi all,

When I get an hour or so free, I'll upload all my Lua based AI stuff that I've put together over the last couple of years.

I was originally planning on selling it, but I just don't have the time to finish it to an acceptable standard :(

It will include a plugin for the creation of Behaviour Trees, Decision Trees & Finite State Machines, as well as code for AI behaviours (flee, wander, evade, obstacle avoidance etc.). I will also include an (almost) completed manual :)

I'll probably have some time at the weekend to upload if anyone is interested.

Regards

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Get navmesh Corners

Postby SolarPortal » 13 Feb 2018, 12:37

Awesome. Thanks Shando :) I did think you had already done it :)



Twitter:
Instagram:
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Get navmesh Corners

Postby epsilonion » 14 Feb 2018, 00:40

I am defo interested mate.. :)
Skyline Help:

User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 5 guests