Git Product home page Git Product logo

Comments (6)

ashblue avatar ashblue commented on August 11, 2024

Thanks for checking out the repo @MostHated. Just this weekend I finished a stable version of Fluid BT. You can find the release package with a CTF example as a package here https://github.com/ashblue/fluid-behavior-tree/releases/tag/version%2F1.0

I still need to finish the documentation (currently none in the Readme.md), a tree visualizer window, more examples, and some other pieces. Have a Trello board I should make public and post to the Readme.md as far as new features go. Hopefully over the next couple months I'll be updating the releases section with new features as I have time to roll these out. If you have any suggestions on how to improve things would love to hear them.

from fluid-behavior-tree.

MostHated avatar MostHated commented on August 11, 2024

No worries, it looks like I had just happened across this right before you committed the example, so I must have seen just a placeholder. I really like the idea and I look forward to trying this out and to see what comes out of this project.

I didn't get a chance to dig much through the code yet, do you currently have, or do you plan to have any sort of library of predefined/premade actions? For example, I am referring to things like the "behavior packs" that Behavior Designer has (movement, tactical, etc). That could end up being a really great 'community addition' if people came up with their own behaviors and have a centralized place to upload and share them with others.

Also, I was wondering if the actions/behaviors needed to be coded and compiled or if it was possible to have specific actions or properties of actions stored in a database and pulled in to be used? Example would be, if I have a boss npc and was using the BT to create the logic for the bosses abilities, such as if the boss has health < 30% attempt to cast heal on himself once every 15 seconds until health is > 50%. If I were to somehow store the logic behind the action in a way that is adjustable/tunable outside the game in a database I could adjust the 50% to 55% without having to go into the code, recompile, build, redeploy to server, etc. I could just change it in the DB, restart the server and try it out again. Does this sound like something that could be accomplished using a system like this?

Thanks!
-MH

from fluid-behavior-tree.

ashblue avatar ashblue commented on August 11, 2024

@MostHated I love that you mention pre-made action libraries. I based a lot of the project on Fluent Behavior Tree and went through some painful extra lifting to make everything extremely extendable. That way people can contribute or create their own re-usable actions, conditions, inverters, ect. If you check the folders in scripts there should be some examples such as "Wait", "RandomChance", "ReturnSuccess", ect.

For your boss example, if I follow correctly (let me know if I'm off here). You could create ScriptableObject(s) (SOs) and pass them into your tree (or dynamically inject from an array of SOs). For example you could have an SO that handles targeting, then an attack action if the targeting is successful, and even add in a cooldown param for your delay. It would end up looking something like this.

...
  .HealthCondition(COMPARE_SO)
  .FindTarget(COMPARE_SO)
  .Attack(ATTACK_SO)
  .Cooldown(COOLDOWN_PARAM)

In the inspector you might bundle all that into a single SO with nested objects. Maybe something like AttackBundle.

I was doing something similar to this on a game project with Behavior Designer. The biggest pain is usually standardizing how you organize your data and coming up with good re-usable SOs. But after that you can create nice chunks of re-usable functionality to speed up prototyping.

from fluid-behavior-tree.

ashblue avatar ashblue commented on August 11, 2024

Note you'd have to extend the TreeBuilder script to do something pretty like the above example. But it should be pretty self explanatory when you look at the TreeBuilder code.

from fluid-behavior-tree.

MostHated avatar MostHated commented on August 11, 2024

Great news on the reusable actions. I am a big fan of reusing and sharing with the community. I spent a ton of money on things like Odin, Behavior Designer, C.A.T., and other assets that end up being "self use only" and I find myself looking for open source alternatives anyways because anything I make with them I can't share.

As for your suggestion, that sounds like it might work out pretty well. One thing I have been trying to find out but can't find a solid answer is if scriptableobjects be not only created but saved after a build is completed. I know you can create instances of them, but I can't seem to find out how or if you can like, import some json, create a SO from it, and save it to the server for future use so it's not lost to a restart or something. That would then allow me to create new abilities directly in a DB if I can then export it to json in the proper format that I end up wanting/needing to use to create an action, then I can just assign the name of the action in the DB to the npc and work up the rest of that business. It sounds like it all might be doable in a way that I am hoping it will.

from fluid-behavior-tree.

ashblue avatar ashblue commented on August 11, 2024

If you're going to have an authoritative database I'd go with just having normal objects instead of SOs. SOs are mostly targeted at being able to tweak data in the inspector while working in Unity. PS You can just write your own Load(string data) and Save() methods to export and import your data to an SO.

from fluid-behavior-tree.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.