Comment by card_zero

2 days ago

Two thousand years ago they'd barely have maps, I don't see why units need pathfinding anyway. In the Age of Empires series it had bizarre effects, like you could steer an enemy army around by building a wall across a forest path, forcing them to take a different path to their target (your base), since they apparently saw the wall with their psychic powers.

Realistically soldiers should head in the right compass direction and hope for the best. But then you (the player) shouldn't have a proper map of your own, either.

An RTS where you could only swap between FPV views of each of your units would be fun. Or at least different. Savage II but there is only 1 player per team, and no overhead view. And you can wrench control from a bot at any time.

> Realistically soldiers should head in the right compass direction and hope for the best. But then you (the player) shouldn't have a proper map of your own, either.

It would depend where and when. An army on their own territory might know the terrain. An army on enemy's territory would try to send scouts ahead as opposed to wondering randomly, too.

So at the army level it would almost work out like the they have "psychic" powers because they have scouts. At the individual units it would depend. But it would also be kind of annoying to play if the realism is increased too much. Like they wander into the woods and get stuck in a bog and die of hypothermia.

This is naive pathfinding that adopts the shortcut of perfect information. Good looking pathfinding simulates realistic terrain ignorance (no "psychic powers"), but it is likely to be expensive enough to require other compromises (e.g. updating paths less often).

  • You reckon the perfect information version is cheaper than an algorithm that works only on the tiles near to the unit? But this quickly gets too complicated to discuss; there's the confusing matter of precalculation versus live updating.

    • The perfect information version calculates the path once on click, the local version needs to recalculate every time the unit moves (and new tiles are "seen")

      1 reply →

At some point its a game and needs to be fun to play. If you are directing a group of five units that might work but if you have 200 units on the field i think it breaks down and is less fun.

> But then you (the player) shouldn't have a proper map of your own, either.

In aoe2 you don't have a full map. I imagine 0ad is similar being a clone

> I don't see why units need pathfinding anyway.

I'm sorry but huh? It's a RTS game, aren't moving units around on the map kind of a fundamental part of the genre and this game?

> Realistically soldiers should head in the right compass direction and hope for the best

If you implement unit movements in a RTS like this, they'll get stuck half the time you ask them to move anywhere, unless you want micromanagement of unit movement to be 90% of the game, which I don't think anyone would find fun.

  • Yes, but if you were that unit, would you get stuck in a corner, or would you persist in trying to find your destination? I suppose if you make it all the way to the target, you've accomplished pathfinding of some kind, by definition, sure. But an algorithm to avoid getting stuck doesn't have to be "pathfinding" as in an expensive algorithm to find a complete path right away.

    • Well, depending on how you implement it, there might not be any way of getting unstuck, imagine a wall that is 3/4 circle for example, with a small opening, could it escape with that sort of naive algorithm? Players tend to be kind of sensitive to "stupid unit movements", and not having pathfinding is a great way of triggering that feeling in every play session.

      8 replies →

Typical armies usually had, if not maps, reliable intelligence and guides. "we've heard this chokepoint is heavily defended" would indeed be a common reason for routing around.

It would be even fancier if there was some logic to take into account the position of your mobile units as well - for example, to avoid massed troops except in favorable conditions.