A* Pathfinding Project

RTS game pathfinding


Just saw this thread! I was asking about just this previously. I’ll see if I can get the RTS Demo to work.

UPDATE: Sadly that requires a pro license, So I will check it out after I complete my project. I’m pretty sure I’m not allowed to use paid assets for a course project. If I’m wrong about that, expect to see lots of questions about how to get it to work. :slight_smile:


fix the rts branch pls


I will when I get back to my main computer. Unite has been pretty hectic so I haven’t been able to get a lot of work done.



I have tried to replicate the native collection has not been disposed errors, but I have not been able to.
What I have tried to do is to just use the RTS scene and use a script to reload the scene several times, but it doesn’t seem to trigger it. Do you have some steps I could follow to be able to reproduce it?



I’ve been debugging the difference in behavior when the agents are stopping and it seems like it’s due to some bad constants I had in my code. From the point where the agents noticed that the destination was crowded they would wait for more than a second before actually starting to slow down.


Try editing a script, let it recompile and then reload the scene. It didn’t work for me, even in your example scene. I don’t see why it wouldn’t work as when you reload the scene everything should get destroyed?
Anyways, I think these things make big difference once you get to the polish stage of the game, because you want to be able to iterate on things fast.


Ah. That did indeed trigger a bug. Every movement script would get their Update method called one more time per frame every time you recompiled and reloaded the scene that way. So the unit would move faster and use more CPU. I did not see any native array leaks though.
I have fixed this in my dev version now.


Well if you got that and the local avoidance working, then can you update the rts branch? I feel like the rts branch has been in pretty much zero day condition for months.


Yeah, that’s what I’ve been working on for the last week :stuck_out_tongue:
I’ve been trying to get a good and stable behavior when moving groups of units and I’m pretty happy with the result right now. I still need to fix a few bugs before I can push out the beta, but it will likely go up within a week.