Live data from Hacker News

Age of Empires Definitive Edition's pathing and movement

richg42.blogspot.com

71–80 of 94 posts

Re: Age of Empires Definitive Edition's pathing and movement

#71
post #30

> Age1's pather's A* implementation was outright broken (the open list management was flawed, so the cheapest node wasn't always expanded upon during each iteration) What is left of A* if even that doesn't work?!?

The easiest way to break A* is to use a non admissible (overestimating) heuristic. This will usually still produce reasonable paths but not optimal.

What they had was even more of a bug where some nodes were skipped from expansion.

Re: Age of Empires Definitive Edition's pathing and movement

#72

Something has puzzled me about pathfinding in games. There is a well-known algorithm[1] for finding an optimal path: you start at the destination, assign that a cost of 0, make a queue from the points that can reach it directly, compute for each of those points the minimum "cost of directly reaching a marked point + cost written on the marked point", and then, while the queue is nonempty, taking the point with the ch…

'Perfect pathfinding' sucks with swarms. The first unit gets to the choke point; the rest about-face and start marching off the long way around the forest (because that's now the shortest path with the primary path blocked). Happened all the time in Warcraft I, and was astonishingly annoying.

Flow algorithms tend to handle this case (and other perfect cases too) more reasonably as they see a choke as a path with low carrying capacity and avoid it ahead of time. (If you're smart and the required carrying capacity is related to size of unit ball.)

The trouble is how to dynamically adjust weights. That is path following and reaction part which is quite outside the purview of path finding algorithms other than that they have to work in an online manner.

Re: Age of Empires Definitive Edition's pathing and movement

#73
post #50

Earlier quoted context omitted.

'Perfect pathfinding' sucks with swarms. The first unit gets to the choke point; the rest about-face and start marching off the long way around the forest (because that's now the shortest path with the primary path blocked). Happened all the time in Warcraft I, and was astonishingly annoying.

It seems like a harder problem than that as well - you might want some of the units in the back of the swarm to go the long way because they'd wait a long time at the choke. But maybe you don't want to do that - those units in the back are squishy and need to stick with the units at the front of the choke. But maybe that's ok - the alternative path isn't too far away and it's not a risky move to make. Maybe that's to…

Typically in RTS it is better to keep formation. If the user spots that units are choking they will order them elsewhere.

The moving units are often easily handled via local avoidance as needed.

Re: Age of Empires Definitive Edition's pathing and movement

#74
post #63
post #53

Earlier quoted context omitted.

I use to be a high level Age of Kings player (Even got an invite to the first World Cyber Olympics in NYC). The pathing was ALWAYS horrible but the PATCHING by the developer was even worse. There were times when the community just banned certain things because they were just broken (Teuten's Town halls were only costing wood but did more damage than high costing resource units and buildings). As a high level player a…

Brood War does this all the time. The pathing is notoriously bad[1] and nothing has been done to fix it because it's not a problem. It allows players extinguish themselves by working with the weird behaviors. [1] Day[9] on Pathing in BW https://youtu.be/rWvoMrYCQBU?t=17m50s

Brood War hasn't had to ban a whole unit or building, though.

EDIT: Now that I think about it, the narrow ramps that you see in the campaign are banned for competitive maps because units like Dragoon will simply never go up or down one unless babysat the whole way, one by one, clicking a few pixels further with each move command so that the Dragoon doesn't go backward. Brood War is full of unbalanced and unworkable mechanics and was fixed not by Blizzard patches, but by literally professional pro map makers.

Re: Age of Empires Definitive Edition's pathing and movement

#76
post #32

Earlier quoted context omitted.

The fact that you don't need to optimize something doesn't mean you shouldn't.

Avoiding premature optimization is one of the most important best practices of modern software development.

This isn't premature... the algorithm and performance are understood. That said, I agree that it's not always the best use of time.

Re: Age of Empires Definitive Edition's pathing and movement

#77
post #63
post #53

Earlier quoted context omitted.

I use to be a high level Age of Kings player (Even got an invite to the first World Cyber Olympics in NYC). The pathing was ALWAYS horrible but the PATCHING by the developer was even worse. There were times when the community just banned certain things because they were just broken (Teuten's Town halls were only costing wood but did more damage than high costing resource units and buildings). As a high level player a…

Brood War does this all the time. The pathing is notoriously bad[1] and nothing has been done to fix it because it's not a problem. It allows players extinguish themselves by working with the weird behaviors. [1] Day[9] on Pathing in BW https://youtu.be/rWvoMrYCQBU?t=17m50s

As a casual gamer I find this aggravating. Why should the NPCs be left dumber and less human than they could be? It breaks immersion and makes the game harder for novices to enjoy.

Re: Age of Empires Definitive Edition's pathing and movement

#78
post #35

The fact that this post seems to be engendered by a comment on a forum ("The pathfinding in the game is terrible.") reminds me of 'Designing Video Games is Hard Work, But the Millions of Angry Players Make It All Worthwhile' http://thehardtimes.net/harddrive/designing-video-games-hard...

It's not really the same sort of thing. In this case, the programmers are dealing with the tricky problem of trying to fix the pathfinding somewhat while leaving the experience of the original game 'authentic'. The pathfinding is terrible, the pathfinding was terrible 21 years ago when the game came out. These forum posts are not surprising and unexpected whining, just a reminder new audiences are finding bad pathfin…

Maybe the solution is a classic/pro mode and a novice/Renaissance mode.

Re: Age of Empires Definitive Edition's pathing and movement

#79
post #63

Earlier quoted context omitted.

Brood War does this all the time. The pathing is notoriously bad[1] and nothing has been done to fix it because it's not a problem. It allows players extinguish themselves by working with the weird behaviors. [1] Day[9] on Pathing in BW https://youtu.be/rWvoMrYCQBU?t=17m50s

As a casual gamer I find this aggravating. Why should the NPCs be left dumber and less human than they could be? It breaks immersion and makes the game harder for novices to enjoy.

Because it's hard to fit a lot of intelligence into the game, when it has to run on a 90MHz Pentium I with 16MB of RAM available.

I thought it was pretty good, and more than enjoyable, when it came out 19 years ago.

Re: Age of Empires Definitive Edition's pathing and movement

#80
post #32
post #6

>DE's pathing system's findPath() function was speeded up by approx 3-4x faster vs. Age1's How would that make any impact at all given that the game ran just fine on 1997 hardware?

The fact that you don't need to optimize something doesn't mean you shouldn't.

At the least, it implies that you ought to carefully consider whether you should. Optimized code often makes trade-offs in complexity, flexibility, etc, not to mention the extra cost in development time.

With those costs, there should be a compelling benefit that you get out of it. Otherwise, it's not worthwhile.

Post reply on HN