Page 3 of 4

RE: Impressions - Pathfinding/Maps

Posted: Fri Dec 05, 2008 3:18 pm
by mavraamides
ORIGINAL: crushingleeek

Is the concern here that the average CC fan does not have a computer capable of handling these numerous calculations? Or that the game engine can not handle this?

I'm pretty sure with the computers out there today, this could be handled by decent cpu's.

Help Programmers!

Displaying LOS this way would be computationally equivalent to calculating LOS to each possible location on the map in worst case (unit sitting on top of a hill with view to entire map). Some short circuiting could be done but it gets a bit tricky.

One thing that could work (and was done in the early days of FPS games like Doom for example) would be to pre-calculate all viewable locations from every location in the map at load time and then store that in a table for fast lookup. Of course, it would still be complicated by vehicles and wrecks blocking LOS that didn't exist when the game started.

Also, you could have the issue that the 'shadow' of a vehicle that you could not see would give away its location. In other words, its possible that a vehicle that is in the sight range of a unit but had not actually been spotted yet would block cells behind it and these dark cells would indicate the location of a yet unspotted vehicle.

Only people intimate with the actual game code could really speculate on the complexity of pulling this off efficiently enough to work in a real time game.

On the pathing issue:

One thing that's always bothered me with talk of better pathing and pathing improvements and all that is the fact that the A* pathing algorithm has been around for about 20 years and there is really nothing to improve on it. One should easily be able to calculate a path from any point to any point on maps this small in a fraction of a second. I'm sure there is a good reason for the pathing problems but again only someone who has looked at the source code could really speculate on why there are any issues on this at all.

RE: Impressions - Pathfinding/Maps

Posted: Fri Dec 05, 2008 9:23 pm
by GoodGuy
ORIGINAL: GordianKnot
[]....pathing algorithm has been around for about 20 years and there is really nothing to improve on it.
Erm, I'm not sure if I understand what you mean. Are you saying the pathing is fine and there's no need to improve it, or are you saying it can't be done?

If looking at games like Company of heros or CDV's "Panzers" you get an idea about how things can be perfected, and - in case of Panzers - how things can be botched.
IIIRC, units in CoH are usually extremely patient, they wait in lines to cross a bridge, although each individual unit may have different waypoints on the other side of a river. If there's a traffic jam, each unit will wait patiently and memorize its waypoint, and it will then start moving again once a jam has been untangled.

In Panzers, units try to find a different crossing right after the first attempt to cross a bridge failed. This leads to situations like units heading to another bridge (mined), where the player then has to catch all these stubborn units, like a cowboy watching/chasing cattle, lol.

It's not a piece of cake-thing to code hassle-free pathfinding, but recent games show that it can be done. The pathfinding in CC is antiquated. Tanks often won't cross bridges, unless you put the waypoint right in the middle of a bridge, on a certain spot. And even after reaching the spot, AFTER passing let's say a wrecked halftrack residing on the left edge of a huge bridge, the tank may just reverse back to end of the bridge if you place the next waypoint on a "bad" location, just because the AI suddenly thinks the bridge is impassable.

This leads to situations where it takes 10-30 mins to get ONE tank over a goddamn bridge.

RE: Impressions - Pathfinding/Maps

Posted: Sat Dec 06, 2008 12:31 am
by Senior Drill
Pathing and LOS in the CC series of games is a function of both the AI algorithms AND the map coding. What we see as a country side and rectangular vehicles is processed by the game engine in terms of square tiles for both the terrain and entities - our warrior sprites. The balance of DATA driven entity sizes determines whether or not an entity can or cannot fit down paths of map terrain element tiles. If the path is X wide, an entity that is X wide can fit into the next tile. If the path is occluded at some point along the path to be X -1, then the path is a No Go and the AI will either reject the proposed path and determine a viable one or refuse to execute the entire order.

Map coding does play a key role. On Map A, a vehicle entity can rummble down the city street without any problems, yet on Map B is does have problems, though the two roads appear to us, the players, to be quite similar. Yet when one looks at the coding of Map B, the building wall coded tiles create a chock point that the X wide entity cannot path through.

Now, don't automatically blame the map coding. Coding is done to the best logical representation of the pretty painted picture of the map graphic that we see within the contraints of the square grid system. Blame also belongs on the game engines interpertation of entities as square blocks. These blocks are given a size in the data files. One can only reduce the width of a square entity so much before the retangular image that we see starts to do things that are not realistic. Tank hulls override building walls without effect, long vehicles bunched up at a pathing block appear to be performing some bizarre tank porn without the spawning of little tankettes. (Pardon me, Sir, but your Panther was raped by a Tiger two blocks back and is now pregnant.)

The compromises in data and coding are well known issues with the current game engine, including all the game code tweeking that can be done. The S3T guys are working at developing a new game engine that will, at the least, resovle many of these issues. 2D or 3D is not the issue, but to what scale and what grid pattern the game engine resolves GO or NO GO decisions is.

Go! Go, speed Shemans!


RE: Impressions - Pathfinding/Maps

Posted: Sat Dec 06, 2008 3:40 am
by TheReal_Pak40
Platoon_Michael,

I played that map yesterday where you had the LOS issue through the building. It seems quite valid to me after examining the building. There are no interior walls in the building and therefore no way to block the LOS through two windows on opposite sides of the building. Most of that building will block LOS, you just happen to have a tank at that perfect angle that allowed a LOS though two windows.

RE: Impressions - Pathfinding/Maps

Posted: Sat Dec 06, 2008 4:49 am
by crushingleeek_slith
I am very naive about map making, but is is possible to draw them at a slight angle, so that windows like these can be seen easier, as well as differences in elevation?

RE: Impressions - Pathfinding/Maps

Posted: Mon Aug 31, 2009 8:20 pm
by Platoon_Michael
Is Vehicle pathing on the list for the next patch?
I havent seen anyone mention it for a long time.

If not how about a Traffic Cop :)

The Tank on the far right did nothing but move left move right move back move forward for 15 minutes.Allies are the AI

Kinda makes you wonder how these guys are gonna do at night.

Image

RE: Impressions - Pathfinding/Maps

Posted: Fri Sep 04, 2009 1:51 pm
by stolidog
Hey Michael, Are you sure there wasn't a traffic cop there? eg a german soldier dressed up as american MP, an added feature as part of Operation Greif

RE: Impressions - Pathfinding/Maps

Posted: Mon Aug 23, 2010 8:20 pm
by Platoon_Michael
As per the other forums that I wasn't supposed to post in can you please check/correct the Elevation in all the WAR maps?
Elsenborne Ridge is also another map with elevation thats not properly depicted by shadding.
Lower area just west of the bridge climbs to 18 to 20m while the road is 7m

RE: Impressions - Pathfinding/Maps

Posted: Mon Aug 23, 2010 11:26 pm
by Tejszd
Thanks Platoon Michael, passed on the information....

RE: Impressions - Pathfinding/Maps

Posted: Wed Aug 25, 2010 12:56 pm
by Dundradal
Dampsquib and I have a WAR GC going with latest patch. We'll be sure to look for stuff too Michael.

RE: Impressions - Pathfinding/Maps

Posted: Wed Sep 01, 2010 4:25 am
by Andrew Williams
Are you guys going to post an AAR or updates?

RE: Impressions - Pathfinding/Maps

Posted: Wed Sep 01, 2010 6:41 pm
by Dundradal
We thought about an AAR when we started, but thought we might take a break for WAR then maybe do one for TLD.

RE: Impressions - Pathfinding/Maps

Posted: Wed Sep 01, 2010 9:39 pm
by DampSquib
Hehe...1 quick AAR for map LaRoche.
Start of level me:..mixed Inf..2 bazooka teams..1 AT gun...1 M18 Hellcat...2 mortar teams. 44 seconds later NOTHING!!!!!!!!!!!!!!!!!!!!!!![:D].
A NEW RECORD ding ding!!!!!!!!!!!
Wish i had a screen shot.

RE: Impressions - Pathfinding/Maps

Posted: Thu Sep 02, 2010 5:56 pm
by Dundradal
Hehehehehe yeah you did get screwed with that deployment area. It was pretty awful.

RE: Impressions - Pathfinding/Maps

Posted: Sat Sep 25, 2010 5:20 am
by Platoon_Michael
On the Malmedy map there is a tree in the large house right at the "Crossroads VL"

RE: Impressions - Pathfinding/Maps

Posted: Sat Sep 25, 2010 1:42 pm
by Tejszd
ORIGINAL: Platoon_Michael

On the Malmedy map there is a tree in the large house right at the "Crossroads VL"

Thanks, bug put in the bug tracker....

Edit: I fixed the element txt file, here it is....

RE: Impressions - Pathfinding/Maps

Posted: Sun Sep 26, 2010 8:08 am
by Platoon_Michael
Thanks tejszd,


RE: Impressions - Pathfinding/Maps

Posted: Sun Sep 26, 2010 8:20 pm
by Andrew Williams
Just backtracked, as seems to be SOP these days.

The malmedy.txt was fixed at release. with the 4.50.2 at release patch.... and also available with the 4.50.7 patch

So, it has been broken with the latest patch... that makes at least three maps reported as broken with this patch.

RE: Impressions - Pathfinding/Maps

Posted: Tue Sep 28, 2010 5:05 pm
by RD Oddball
ORIGINAL: Platoon_Michael

Heres another one,went in my favor but inmho shouldnt had.
The map listed the ground at 8.0m where the 105 Sherman was,the house at 8.0m and the ground around the Panther at 8.5m

Image

Hey Michael I checked the map coding and elevation on Meyerode and everything looks as good as it can be for the CC map system. There are a few spots where the elevation is barely cutting through the buildings and I'll tweak those but those wouldn't account for what you're seeing.



Image

RE: Impressions - Pathfinding/Maps

Posted: Tue Sep 28, 2010 5:07 pm
by RD Oddball
ORIGINAL: Andrew Williams

Just backtracked, as seems to be SOP these days.

The malmedy.txt was fixed at release. with the 4.50.2 at release patch.... and also available with the 4.50.7 patch

So, it has been broken with the latest patch... that makes at least three maps reported as broken with this patch.

Great detective work Andrew. Will have a look at it. Thanks!

*EDIT* I looked for the initial bug report and did not find one. Please PM or e-mail me the link to the report. Thanks.