Jump to content

Problem Driving Past Buildings...


Quagmire

Recommended Posts

Hi guys,

I'm currently using the latest version 2.460, but since 2.328 and the Beta (2.370) I have been making various terrain maps for single-player scenarios. One work-in-progress in particular is set in the desert with buildings lining the streets for that 'urban' feel.

I loaded it up today (been ages, created it in 2.370!) and set a couple of tanks to run around it to see what I wanted to add, but the tanks now have an absolute nightmare driving past buildings in a straight line - and especially around corners!

The map originally had buildings very close to the roadside and in previous versions (including the beta when I did most of this map), vehicles had absolutely no problem navigating the streets at the set speed. I had even used it in some single-player scenarios where speed was of the essence, so charging around a street with Humvee's or tanks to gain ground etc. was all part of the plan. :)

To test this I moved the buildings back along one stretch of road, and deleted the building right on the corner, yet the column of tanks still stop, zig-zag, reverse etc. just to turn right!

I've attached the work-in-progress map (as SCE), and it only contains (for test purposes) a 4-tank column that are just told to move into the town, and turn right at the junction then proceed for several hundred yards. Nothing fancy. Very simple procedure.

I ran it, and it took almost 5 full minutes for them to travel that distance thanks to all the stopping and starting etc. The first stretch, and after turning right you will see the buildings are further back from the road, yet they still have problems navigating them.

They are running at close spacing, normal speed. I've tried varying speeds and formation distances yet get the same result. I never experienced any problems with the Beta (2.370) doing this - only now. Very odd.

Anyway, let me know if you see the same problems.

Thanks,

Quagmire

56e83c78c567d_RouteProblem_zip.00e95e687

Route Problem.zip

Edited by Quagmire
typo!
Link to comment
Share on other sites

  • Members

I have always advised against the creation of maps with a dense population by buildings until we'd have both the engine and related behavior tailored for it. Making improvements in the pathfidinfing especially with buildings with an overhang is on my "above average" priority of The List though.

Link to comment
Share on other sites

  • Moderators

The AI pathfinding was recently adjusted to increase the AI's ability to bypass buildings. Your scenario did not cause problems before because, to put it simply, the AI did not avoid buildings. If you gave a unit a route through a building, then it would happily and blindly drive into the building and just sit there. In this case, you routed the route around the buildings nicely, so you never saw the building avoidance problem, and it actually played to the advantage of your map.

Unfortunately this is a push and pull relationship. To fix the lack of building avoidance, then a sort of buffer zone must be around the building so that the AI will try to keep a little distance from it so that it can circumvent them. Unfortunately that means your buildings are now far to close to the road for the AI's comfort. Still, your roads are quite large so hopefully we can improve path finding issues even further in the future. One problem has always been that the AI will refuse to use the other lanes in the road. :( As you can see by their driving, the AI is considering the true edge of the road as the "lane", not the actual lanes which are graphically represented on the road itself (ie. the shoulder of the road is actually the lane).

Some definite path finding corrections could probably be made on this two lane road so that the AI considers the "lane" to be more towards the center, but unfortunately the buildings are still too close to the edges of the single lane roads for the AI's building avoidance routine.

Link to comment
Share on other sites

Thanks for the explanation Volcano. I'll edit the map and move things further back. That will help in the meantime. A case of trial and error I guess.

As for the road lanes, I did think it was rather polite of the tank drivers to sit on the outside lane of a motorway when driving! :biggrin:

Try as I might I could never get them to sit in the middle - now I know why. :)

Cheers!

Quagmire

Link to comment
Share on other sites

Greetings all,

So here's a question ref. the initial construction of the urban enviroment.

If you overlap two road types on the same route (ie:2lane and a single lane) is it the last road that was placed, that the Ai see's? If it's following the road edge is there a way to set the narrower road in the center of the wider road?

9erRed

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...