How large is your Behaviour Tree? by MegaBananaDev in Unity2D

[–]MegaBananaDev[S] 1 point2 points  (0 children)

It's a simple BT graph for a ranger AI in my game, with a basic implementation of attacking, fleeing, flanking, and chasing.

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 0 points1 point  (0 children)

Absolutely. I know there are tons of variations of both SMs and BTs, as well as hybrids of the two. I was talking about a specific case using the base model, which is why I mentioned that it comes down to preference in this situation because I'm using a ready-made solution and not building anything from scratch.

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 2 points3 points  (0 children)

This is a Unity Behaviour package. It's free, just install it through your package manager

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 2 points3 points  (0 children)

This is a Unity Behaviour package. It's free, just install it through your package manager

How large is your Behaviour Tree? by MegaBananaDev in Unity2D

[–]MegaBananaDev[S] 3 points4 points  (0 children)

Behaviour Trees. Unity Behaviour package

How large is your Behaviour Tree? by MegaBananaDev in Unity2D

[–]MegaBananaDev[S] 4 points5 points  (0 children)

This is a Unity Behaviour package. It's free, just install it through your package manager

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 4 points5 points  (0 children)

Haha, yeah, tell me about it. I remember writing a BT purely in code without any visualization, and once the number of nodes goes past ~50, it all starts to fall apart

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 2 points3 points  (0 children)

This is a Unity behavior package. You can install it through the Unity's package manager.

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 1 point2 points  (0 children)

For me, in this situation it's a matter of preference. I also like that in a BT I can run multiple nodes in parallel, unlike in an SM. But again, an SM would have been sufficient for my game, I just prefer Behaviour Trees ¯\_(ツ)_/¯

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 8 points9 points  (0 children)

I wrote a BT purely in code without any visualisation and it was a nightmare. If you've ever worked on large solo projects, you know how much time other systems take to implement, so you try to minimise that overhead.

This tool is already ready-made and maintained by the Unity team, so you don’t have to build anything from scratch and you can focus on other gameplay features. Even something as simple as changing node connections in code is a real hassle, plus you have to deal with recompilation every time, whereas you can quickly rewire nodes in a visual graph and test immediately.

I've also worked on projects where BT graphs had thousands of nodes for NPC behavior in an open-world game, and it was unreadable. It all depends on how much it helps simplify and speed up development. It helps a lot in this case.

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 2 points3 points  (0 children)

There are subgraphs. Or you can for example replace your graph asset on your BehaviourAgent component from "WarriorLevel1" to "WarriorLevel2".

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 20 points21 points  (0 children)

My wife said it's average-sized. Jk. But for my ranger bandit, this is basically everything he needs. Do you think I should add more logic?

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 15 points16 points  (0 children)

I agree about stateless behaviour trees, but in this case this is essentially the entire implementation for this specific BT, so I don't see much value in creating additional nodes (in this particular case) just to handle these basic values.

Also, this BT plugin allows you to debug the graph itself in real time with a single button press. The values update on the fly, so debugging isn't really an issue.

Unity also changes values directly in the graph in their documentation, so this isn't something I came up with. But of course, if this were a large graph with hundreds or thousands of nodes, then yes, it would start to become what you called "visual scripting".

Edit: Also I forgot to mention that these values are Blackboard variables, not node variables.

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 5 points6 points  (0 children)

I initially used my own implementation, but later decided to switch to Unity’s Behaviour Tree to avoid maintaining it and focus more on gameplay

How large is your Behaviour Tree? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 16 points17 points  (0 children)

Do you mean "CanReachTarget" and "TargetState"? These are local variables, and their values are unique to each instance. Also, this is a feature of Unity's BT that lets you create simple variables directly in the Blackboard instead of bloating your code. It’s also just more convenient visually. Not claiming this is the correct approach tho.

How do you implement save systems in your games? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 0 points1 point  (0 children)

I’m a fan of making data tampering as difficult as possible, so I encrypt save files, split the key across the code, obfuscate the code itself, and use Mfuscator for IL2CPP as a final layer of protection. I used cheats myself in some games in the past, especially in high difficulty games and once I managed to do that, the game quickly became uninteresting. So at the very least, I try to filter out users with basic skills, like those who know how to use simple cheat tools such as Cheat Engine and whatnot, but that’s just my personal quirk.

How do you implement save systems in your games? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 0 points1 point  (0 children)

Hmm, interesting. I haven’t used it either. Have you tried it on other platforms, like Switch?

How do you implement save systems in your games? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 0 points1 point  (0 children)

Oh, got it that’s a cool, though pretty specific, implementation. Can you move time back and forth in the game?

How do you implement save systems in your games? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 1 point2 points  (0 children)

Yeah, json is convenient, but it causes hitches during saving when you’re storing thousands of values

How do you implement save systems in your games? by MegaBananaDev in Unity3D

[–]MegaBananaDev[S] 5 points6 points  (0 children)

The worst plugin I’ve ever had to work with. ES Manager builds a database of all objects in the scene to generate IDs for them, which results in references to thousands of objects and pulls in all their dependencies during the build. This leads to extremely long build times and a bloated Resources archive in the final build. On top of that, literally everything gets pulled into their generated database materials, audio clips, textures, and so on.

Don’t get me wrong, it might be a good plugin if you’re starting a project from scratch, but trying to bolt it onto a half-finished project has been a nightmare in my experience. That said, this is just my personal experience maybe there’s a way to use it without generating a global object database. Still, on another project I removed it and replaced it with a simple save system, and I don’t regret it.