upvote
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.
reply
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.
reply
There certainly are naive ways, although whatever I suggest here will be poorly thought out and will lead to the next problem. But OK, I suggest a scent trail. Each unit paints where it's been and prefers not to go that way again. Then of course it could paint itself into a corner, so it needs a local-maximum-busting strategy too, which probably means marching off in an arbitrary direction to see if it gets unstuck.

This would be behaving like a caged animal, and in a game, that's good, and better than a smarter algorithm. You don't want them to be idiots, but you don't want them to be magic, either.

The old "follow the left-hand wall" maze-solving strategy is another naive way to get out of a trap. It's not fun gameplay, but it's naive and it exists, so better naive strategies do too.

reply
That’s pathfinding. I thought you were opposed to pathfinding?
reply
Well, ish. My theory is that you can have units make individual local choices that add up to somewhat inept pathfinding, and it works out cheaper than maintaining live-updated whole-map pathfinding information.
reply
Not only is that pathfinding, it sounds like an especially complex pathfinding algorithm that would be pretty challenging to implement efficiently.
reply
In what way?
reply
Well, if each unit leaves its own scent trail, that’s a lot of per-unit state, and little to nothing that you can pre-compute for the entire map. You could have all units trails on a global “scent layer” that all units read from, but then you’re basically just building up a graph of common paths that could have been precomputed for the entire map.

It also doesn’t at all address inter-unit collisions, which is a big topic in RTS pathfinding.

reply
When you get stuck, try random directions. That's what my robot vacuum does.
reply
Not sure if you've played any RTS lately, but I'm fairly confident people would drop the game relatively fast if they started seeing their units taking off in random directions because they cannot find their way around a wall. But we could also be playing very different games :)
reply