Asking if RTS pathfinding is possible

So i’ve been playing a lot of RTS games, mostly ones where you have squads of units and they can be commanded to travel, or attack.

Getting the units to follow commands is clearly possible, but how do I get them to move there? Avoiding obstacles and finding the fastest route, or stopping halfway because they got attacked.
I just don’t see it happening in Flowlab.


Proximity and RayCast?

1 Like

If you can show me an example that actually works well, and isnt a one screen maze. Then i’ll attempt it.

1 Like

Idk because I’ve never played an RTS game before but maybe you could check Halo Wars (2) for a reference

I think tinker smith also has a path finding example

Oh wait Brick was the one to make it (Galactian already sent you the link

1 Like

So my examples that Galactian linked have more efficient code, but as well if you want a more RTS focused example you might look at the “RTS Test” level in this game:

You can Right-Click and drag to select units and then Left Click to set their target location. Only the green, orange, and purple units have pathfinding abilities.


I’m using one of them and it says “Tap to move” But they just a move a little bit. I really wanna know if you can make the player go to where you tap, because in this example the player just goes towards the mouse.


Which of my examples are you looking at? The “Pathfinding (Top Down)” game seems to have exactly what you’re looking for…

Yeah that game, Is there a way to click on the other side of the level and the player travel there without being guided?


This one?

It already does that; if you click anywhere the characters will go to that point