RTS game pathfinding

Hi Aron,
I’m seeing the same behaviour. Pretty sure it’s an empty project and I had a general look at the physics settings and all seemed reasonable.
Note that disabling the Sphere Collider stops the units taking off, not sure if the demo is still working as intended though (I can move the units around, but that seems to be all)
cheers,
Ben

Hi Aron, I’ve got the same issue as Jabb and Ben. I think it is related to the preview packages (entities, burst) used. A Unity support guy recommended to update burst to the newer 1.2.0 preview to fully support TypeInfos (https://forum.unity.com/threads/build-error-with-burst-entity-subscene.798294/), but your 4.3 beta has an older dependency. Trying the 1.2.0 led to new errors though.

I got these issues in my own project as well as your example scenes. Using 2019.3.f3.

Yes - it’s an empty project in both 2019.3.0b7 and 2019.3.0f3

It’s a triplanar shader made with Substance Designer.


@aron_granberg
I get a NotImplementedException when scanning the navmesh.
It says something about obstacles, but only obstacles I know I’m using are RecastMeshObj components, which I think are supported?

I get a NotImplementedException when scanning the navmesh.

@sepnax It seems you are using the RVONavmesh component. This will add rvo obstacles for every edge in the navmesh. And RVO obstacles are not supported in the beta.

@Ifexx I have not been able to replicate these issues. I’m using burst 1.2.0 in my project.

1 Like

@aron_granberg
Oh ok. I deleted it. I had no idea what it was doing :sweat_smile:
Is there a utitility function or such to get a closest unoccupied position on the navmesh to a given position?

When accounting for RVO? No, I’m afraid there is not. The system doesn’t track this in any way.
You could use RVOQuadtreeBurst. It allows you to query some things.
You can access the quadtree from (RVOSimulator.active.GetSimulator() as RVOSimulatorBurst).quadtree.

@aron_granberg
Ok.
How about the Alternative Path Modifier, does it work with RTS beta?

It works. However the alternative path modifier is best suited for grid (or possibly point) graphs. It does exactly what it is supposed to do on recast graphs too, but since the nodes are so large (and have very different sizes) the result is usually not that great.

@aron_granberg
Could you publish a version of the beta branch that supports the Unity 2019.3.5f1?
It would be really nice not to work with beta version of Unity.

@sepnax

I think the latest beta (4.3.15) supports the latest 2019.3 version.

Tried to update it but the assembly definition stuff is major headache again.
I tried both just updating with the unity package and then when that didn’t work, I deleting the old files and adding them as new. I tried everything, incluiding just deleting the Library folder :sweat_smile:
But I just get this same error.

It really seems like unity just doesn’t compile the “ALINE” asmdef for me.

That probably means you do not have the required dependencies. I have some code in the package to automatically install dependencies, unfortunately when upgrading it will not run until everything compiles… So it’s only really useful for new installations.
You can check the ALINE.asmdef file in Unity. You will see the package versions it expects and you can make sure you have those with the Unity package manager.

Unity seems to have improved the support for custom packages recently. So it’s possible I can migrate to that soon. Which would make things a lot smoother.

I ran into some crazy problems trying to update.
I got error messesages saying namespace “UI” doesn’t exist in namespace “UnityEngine”
Then crazily enough, unity lost all Object references in scenes and prefabs.

Ended up reverting it all and giving up on the updating :joy:
I might try again when I have the time and have gathered myself from this failure.

@sepnax
I’m sorry to hear that.

During the last few days I’ve been trying to get the unity package manager to work, and I think it might be working now.
Try to follow the instructions here: https://arongranberg.com/astar/download_upm. The version numbers are a bit weird now, but I think it should work if you try to install 4.3.19. Make sure you follow the instructions and delete your existing AstarPathfindingProject folder before you import.

@sepnax After some more tweaking I have uploaded a proper upm package now (4.3.16) which I think is pretty reliable. See https://www.arongranberg.com/astar/download

Hello,

I would like to start by thanking Aron for doing a lot of support work on this plugin, it is a very important part of any game and the continued work is always appreciated.

I am using the asset to create a 2D RTS game and so I am very interested in the current features being worked on in the beta. Is it possible to get a summary of the working features currently available for RTS genres?

Even after 5 months I haven’t bothered yet to update to the newer version of the beta after my last failure of trying to do it.
I guess the version I’ve been on has been working good enough :sweat_smile:

However I came here to report that I found a explanation to this.


Year later :rofl: Can you belive that.
See, I noticed that you have added some support for hot reload in BatchedEvents,cs. While I appreciate the notion theres something weird that causes your FindObjectOfType not find a result, it seems. How do I know this? I changed the HideFlags to not be HideAndDontSave to just DontSave. After that, I can see in the unity scene view that there infact are multiple instances of BatchedEvents, after hot reload.
The data in BatchedEvents is contained in static list and the result is quite aribitrary if you have multiple BatchedEvents instances in scene, probably.

@sepnax

Hah! You are absolutely right.
It was surprisingly tricky to work around, but I found a solution which doesn’t require that much code and which I think is more stable.
This will be included in the next update.

I don’t think the previous code should cause any logic problems though. You may get some stray instances of BatchedEvents, but everything should still work well I think (but I haven’t actually checked this).