JsonFX

Hi Aaron,

Just purchased your A* pathfinding product because we were unable to get the performance we needed with the built-in navmesh system in unity on the iPod touch.

Hopefully yours is going to be as fast as the forums say!

Anyways, we are using JSON to serialize some of our game data and we are having issues as there now are two competing versions of the JSON in there. Is there a way to get the two to co-exist?

Also of note, we are getting tons of errors regarding conversions of int3 to vector3… not sure what that is about, but from what I’ve read it might be a conflicting definition of the int3 class again dude to the JSON usage.

Finally, you mentioned that we could possibly get a preview of the latest local avoidance, and I would desperately like to get my hands on that as we are going to have mobs in our game that require that type of behaviour. I purchased via the unity asset store so perhaps I can send you a receipt as confirmation, or whatever else you prefer.

Thanks so much,
Chris.

Hi

It is possible for them to coexist, that is why I have put it in a different namespace, however since that would basically add to your binary size. I would recommend that you use one of them only. If you are using the original JsonFx you could easily switch to use the one included in this package. I have even added more features to it and made sure it worked better with iOS. The JsonFx source is posted here. Not sure if it is the latest version though, I might have forgot to push the latest one.

What errors are you getting? It would be nice to know so that I can make the implementation more resistant to conflicts.

The Int3 conflicts are most likely due to that you have another class named Int3 in your project. Try to import the package to an empty project to make sure, it should show no errors then.

Sure, if you have bought it you can get a developer preview. Just email me on aron [dot] granberg [ @ ] gmail (.com), and I can send it to you.
Good news for RVO is that I managed to improve performance a huge lot with some fixes to the scripts today. Now I can get 5000 agents moving around at 50 fps! (or 1000-2000 when every agent is a GameObject).

It seems that there are several places in your code that rely on Debug.DrawRay that takes vector3. These are being sent int3’s which no longer implicitly convert.

Other than that we are now converting our code over to your MiniJSON. I will post later to give a status update.

Hm. Ok, it seems if you enable the DEBUG preprocessor directive, some code which I forgot to convert to use explicit Int3 conversion will get enabled. So try to find all pathfinding project scripts which have #define DEBUG at the top and comment out those lines, they should not be enabled by default so I’m not sure how they got enabled, but I think that is the problem anyway. It might also be that you have added DEBUG to the list of global preprocessor directives in Menubar -> Project Settings -> Player, however I think that only exists in Unity 4.

The solution we have chosen to go with is to simply use the JSONFx that was included in the Pathfinder namespace. All that was required was a new “using” statement and then everything fell into place.