why don`t Water Path Nodes work?

Interesting mapping tools and mapping help.

Moderator: Morax

why don`t Water Path Nodes work?

Postby Ghoustaq » 22 Jan 2018, 16:01

the Land Path Nodes worked well, but the Water Path Nodes seemed have no effect on AI's actions. AI just built its naval untis
over and over again., but never sent them to attack or defend. What's wrong? :roll:
User avatar
Ghoustaq
Avatar-of-War
 
Posts: 65
Joined: 25 Dec 2017, 13:54
Has liked: 10 times
Been liked: 0 time
FAF User Name: Ghoustaq

Re: why don`t Water Path Nodes work?

Postby Sprouto » 22 Jan 2018, 20:08

A great deal has to do with the map - which map in particular was giving you this behavior ?
Sprouto
Priest
 
Posts: 366
Joined: 08 Sep 2012, 05:40
Has liked: 54 times
Been liked: 74 times
FAF User Name: Sprouto

Re: why don`t Water Path Nodes work?

Postby Ghoustaq » 23 Jan 2018, 15:12

Sprouto wrote:A great deal has to do with the map - which map in particular was giving you this behavior ?

the map which I am making now is a skirmish map. I edited the markers of this map with the tool of "MarkerEditor". Maybe I should try your AI, it looks smarter and more powerful.
User avatar
Ghoustaq
Avatar-of-War
 
Posts: 65
Joined: 25 Dec 2017, 13:54
Has liked: 10 times
Been liked: 0 time
FAF User Name: Ghoustaq

Re: why don`t Water Path Nodes work?

Postby Sprouto » 23 Jan 2018, 15:24

The Naval AI in both the stock, and the Sorian AI, are rather undeveloped. Compounding that, there are some issues that make matters worse, such as split water maps (maps with more than one body of water -- like Setons). LOUD is certainly more advanced in that area, and understands proper water movement on those type of maps.

You've used the correct editor for the markers - so if you want to try your map with LOUD, put it into a safe place, install LOUD and then move a copy of it into the maps folder. Or just install LOUD and have a look at some of our water maps, such as Coastal Conflict, using the marker editor. This might give you some help in making sure that your own markers are well positioned.
Sprouto
Priest
 
Posts: 366
Joined: 08 Sep 2012, 05:40
Has liked: 54 times
Been liked: 74 times
FAF User Name: Sprouto

Re: why don`t Water Path Nodes work?

Postby Ghoustaq » 23 Jan 2018, 16:02

Sprouto wrote:The Naval AI in both the stock, and the Sorian AI, are rather undeveloped. Compounding that, there are some issues that make matters worse, such as split water maps (maps with more than one body of water -- like Setons). LOUD is certainly more advanced in that area, and understands proper water movement on those type of maps.

You've used the correct editor for the markers - so if you want to try your map with LOUD, put it into a safe place, install LOUD and then move a copy of it into the maps folder. Or just install LOUD and have a look at some of our water maps, such as Coastal Conflict, using the marker editor. This might give you some help in making sure that your own markers are well positioned.

it's true that there're a sea outside the land and two closed lakes inside the land on my map, if I create rivers to connect the lakes with the sea, will it help to slove this problem?
Last edited by Ghoustaq on 23 Jan 2018, 19:57, edited 1 time in total.
User avatar
Ghoustaq
Avatar-of-War
 
Posts: 65
Joined: 25 Dec 2017, 13:54
Has liked: 10 times
Been liked: 0 time
FAF User Name: Ghoustaq

Re: why don`t Water Path Nodes work?

Postby Sprouto » 23 Jan 2018, 18:33

Well, not likely.

Of course, I'm going to assume you've connected your nodes (believe me, I've seen people who thought you just put the nodes on the map - but don't need to connect them).

For a proper water map, the first thing you'll need is a Naval Area marker. This is where the AI will start a naval base. Be sure to not place it too close to shore.

Next -- you'll need the Water Path nodes. Here's a few guidelines .

-- less nodes is more efficient for the game -- for water paths, nodes should be about 2-3 km apart
-- don't forget to connect them (and again -- less connections is more efficient)
-- don't put nodes too close to the shore - this will cause platoons to get 'hung up'
-- don't put nodes right on top of other markers - this can cause traffic and collision issues

Think of your nodes as guidelines, the AI platoons use the nodes to get to the general vicinity of where they want to go - and then they will move freely from there. So, if you put one or two nodes about 2km from your Naval area, the AI should be able to leave his naval yard and get around the map. If you put a node too close to your naval area, the AI may not be able to form his platoon up due to crowding.
Sprouto
Priest
 
Posts: 366
Joined: 08 Sep 2012, 05:40
Has liked: 54 times
Been liked: 74 times
FAF User Name: Sprouto

Re: why don`t Water Path Nodes work?

Postby Uveso » 28 Jan 2018, 13:47

Hello Ghoustaq,

i viewed the gamecode and all NAVAL units re using "NavalForceAI" - "NavalForceAISorian" to control sea units.
This function is using "AIPlatoonNavalAttackVector" - "AIPlatoonNavalAttackVectorSorian" for path finding.

So the AI has a function to search and use naval nodes.
I also saw many outcommented lines and like Sprouto said, the naval AI is kind of underdeveloped.

If you want; send me your map and i will debug all naval functions and repair them if necessary.
So we have at least the basic functions for naval ready to go.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: why don`t Water Path Nodes work?

Postby Uveso » 12 Feb 2018, 07:47

Progress with markers and path's.

PathDebugII.png
PathDebugII.png (312.13 KiB) Viewed 3415 times

All AI's are using their own pathfinding function. And all functions are working now; incl naval pathfinding.

Example from the new code:
Code: Select all
    --Generate the safest path between the start and destination
    local path
    if aiBrain.Sorian or aiBrain.Duncan then
        -- Sorian & Duncans AI are using a strong modified pathfinding with path shortcuts, range checks and caching for faster performance.
        path = GeneratePathSorian(aiBrain, startNode, endNode, ThreatTable[platoonLayer], optThreatWeight, destination, location, testPath)
    elseif aiBrain.Uveso then
        -- Uveso AI is using a optimized version of the original GeneratePath function with modified path caching.
        path = GeneratePathUveso(aiBrain, startNode, endNode, ThreatTable[platoonLayer], optThreatWeight, destination, location, testPath)
    else
        -- The original AI is using the vanilla version of GeneratePath. No cache, ugly (AStarLoopBody) code, slow, but reacts faster.
        path = GeneratePath(aiBrain, startNode, endNode, ThreatTable[platoonLayer], optThreatWeight, destination, location, testPath)
    end


Bad news; this update is part of a bigger project and will not be finished before april (or later).
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: why don`t Water Path Nodes work?

Postby Uveso » 13 Mar 2018, 06:56

@Ghoustaq:

Good news about naval pathing. Its working now :)

I have linked a demo video here:
viewtopic.php?f=53&t=15976&p=161729#p161729
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest