AI, pathmaps, aircraft, strategic areas....

Ask questions, discuss ideas, get answers
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

AI, pathmaps, aircraft, strategic areas....

Post by fo0k »

I'm trying to understand how to route some aircraft to a strategic area.. so they don't just fly in a straight line. they need to go down through some valleys, and over a few peaks etc on the way..

any help? if even possible..

EDIT:


I am running the non-ai version of the map on the BFMODS server



(If you dont have much time to play these days I'd really appreciate you loading this up just to see if anyone has issues with lag. hoping not but its big.. as we know.
You can download it here:

Download the map here

SERVER: 173.199.75.25
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: AI, pathmaps, aircraft, strategic areas....

Post by fo0k »

have tried the principle in this similar-ish question.... http://bfmods.com/viewtopic.php?f=6&t=1 ... cuit#p1036

but they just seem to sit and fly around the closest point without moving on.
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: AI, pathmaps, aircraft, strategic areas....

Post by POTAmatt »

No surprise. You could neighbor a bunch of SA's together creating a route and allow only air vehicles through it, but without pathmap restrictions, planes will take a bee line to their final destination. I don't think this is gonna be made to your satisfaction.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: AI, pathmaps, aircraft, strategic areas....

Post by fo0k »

:)

what I have is some very high (some with steep faces) mountains.. and so the plane will crash into them on route to the SA...

Now, Apache setup very basic ai.. the bots spawn into the planes and fly to the center of the map (.. single flag strategic area..) but.. on the way are some very high and sometimes steep sloped mountains.. and by the time the bots realise they are 'low' due to angle of the slope.. its too late and hari kari commences. I tried adding a few 'route' SA's but no joy, and I would expect 99.9% down to huge glaring errors with my attempt.

but.. I did copy the guts of the strategic areas from Alamein.. mixed up the coordinates a bit to suit my map and noticed that rather than go straight to the middle this time.. they (allied) would always go via the airfield.. just swoop by then on to the next. my thinking is that If I can place some SA's like this airfield either on the top of mountains.. or just through the Vally's.. they will survive.

of course did make some copies of the airfield SA and they ignored it.

do planes take any notice of pathmaps? (perhaps that's what you said in a round about way..)
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: AI, pathmaps, aircraft, strategic areas....

Post by POTAmatt »

but without pathmap restrictions, planes will take a bee line to their final destination
Roundabout? While i am an old 'Yes' fan, i thought that was rather straightforward;)

Yes, air vehicles do not use pathmaps. If your goal here is to merely keep planes from crashing into mountains, then adding additional SA's is only going to confuse matters further. What slows down the SAI most is the fact that everything on the map needs to be defined to the AI; every handweapon, vehicle, object, otherwise CPU cycles are wasted as bots are indecisive. That's when planes crash, boats beach themselves, etc. because bots aren't making good use of the time alloted to them.

If your goal is to have them fly a preplaned route, such as a race, it would be difficult because once the bot gets assigned the SA he's supposed to be in, it will fly straight to it from its current location because airvehicles don't use pathmaps.

P.S. Can you attach the map?
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: AI, pathmaps, aircraft, strategic areas....

Post by fo0k »

heheh, fair enough. :lol:

OK, sending you a link.. thanks for taking a peek at this. a word of caution.. it's big. ed42 / BC will not open the map correctly, so 3dsmax required or just manually find locations in game with showstats.... but the attached map should help out as a reference to locations.

To recap the goal here:

Allies spawn top right of map..
Axis bottom left.
Single CP / SA in center of map,
Ideally bots do not spawn in the air.. they will take off from the bases and manage to reach the middle without piling into a mountain.
Actual gameplay should simply (heheh) be that both sides try to hold the middle whilst killing each other.
no land vehicles to worry about.

click it.. n zoom it.. n drag it..
128_planes_height_helper_C.png
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: AI, pathmaps, aircraft, strategic areas....

Post by Swaffy »

Wow, that's like a Battlefield: Bad Company size of a map! I love huge maps.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: AI, pathmaps, aircraft, strategic areas....

Post by POTAmatt »

That map is huge, and very cool. But the sheer size of it is probably what's causing it's slugishness because i've yet to produce proper pathmaps. Not that pathmaps are needed for the planes, but they are for the strategic AI. In the meantime, i was able to create an all new, simplified set of strategies to get everyone right to the center and stay there, and that works just fine. To quickly rule out the modifed plane as being an issue, i temporarily replaced it with a stock bf109 and even they are sluggish in avoiding the mountains. I'll keep messing with in the event that there are other issues slowing up the map.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: AI, pathmaps, aircraft, strategic areas....

Post by fo0k »

great, thanks! yes I don't suppose you will be able to create a pathmap at 32768 x 32768 !! I guess bf craps itself after 4096?

they seem to fly pretty good here... but yeah just only look 'down' to keep a good height..? rather than look forward a bit too...
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: AI, pathmaps, aircraft, strategic areas....

Post by POTAmatt »

I guess bf craps itself after 4096?
Yeah, exactly. You get some such nonsense as this:

Code: Select all

(mCurrentMemoryPtr >= mMemory && mCurrentMemoryPtr < mMemory + mMaxAllocChunkSize) Overwritten memory in pool??
But no biggie. They're already getting where they need to be via the strats, so it's just a matter of improving the avoidance at this point. I'm wondering if the increased y-scale on the map is a contributing factor. There's still plenty more things to try. We're getting there, though!
Post Reply