Wednesday, March 7, 2018

VBT Update 3/7/18

(Click to enlarge)

The tree's editor has been connected to the backend and is at last, functioning! The agent loads the tree, and runs the given behavior.

Completed:
  • Serializes/deserializes tree to/from JSON
  • Rewrote Blackboard to serialize correctly
  • Make agents use singular static reference to given tree, using their own blackboard variables
    • Manager determines loading and unloading of tree instances
  • Rewrote much of tree editor
  • Wrote and tested logic for composites, decorators, and actions. Subtree action included and correctly loads and uses tree within tree.
Up Next:

  • More actions and composites
  • Testing in builds
  • More editor debugging features
  • Improve UI / usability
  • Ultimately, use to design AI for an indie game

Saturday, February 24, 2018

VBT Update 2/24/18

I've been hard at work getting the editor linked up to the agent tree. 

  • The tree itself will be a static reference that all agents can use a single instance of- so you can have 1000 agents and you'll only have to duplicate their local variables, not all the tree stuff.
  • I've focused on doing some neat reflection magic in editor to make adding new behaviors easy.
  • The editor and agent behavior is still totally separated so that when building to platforms, all of the editor based code is stripped. In editor however, they link into each other so you can make changes to agent behavior on the fly.
  • I've switched JSON from CSV, and to serializing/deserializing classes using the Newtonsoft .NET JSON lib. This solution seems far more sustainable and easier once the initial groundwork is laid. Serialize() & Deserialize(). ez.
I'm currently in that dark tunnel of code wherein you depart with a map and hope to emerge on the other side with the glorious treasure of a new set of features. Wish me luck ; )


In the meantime, I'd dug up the bits of the OST that I'd done for the roguelike Deathstate (on Steam) and realized I'd never posted that so give it a spin!

Monday, January 22, 2018

VBT Update 1/22/18

I've added serialization to the behavior tree. You can see a gif of saving and loading a tree out below. (Click to view full size)




I've opted to store the tree in a space separated value sheet with key value pairs, to keep the file size small. Other contenders are XML and JSON, but SSVs are easy to parse and there are no JSON parsing libraries included with Unity, and the overhead with XML doesn't seem worth it here.

Next time I'll be working on having the agent correctly run through the tree in-game, and perform what actions are specified. The "brains" of the operation. This will be tricky so I'll start with running through the tree each update loop, but later state-saving can be added to increase efficiency. 

Monday, January 15, 2018

VBT Update 1/16/18

- Hooked up the VBT editor window with the inspector to both display the current Agent's blackboard
-The values carry over between them
-I've also added support for saving and loading files
- A few visual tweaks / usability

 

Next:
- Serializing/deserializing tree data

VBT Update 1/15/18

Blackboard support has been added to VBT. You can select a data type, name, and value to but used with the agent. A blackboard is a public collection of variables to be used and modified by an agent via it's behavior tree.



Next I will be integrating the blackboard with the behavior tree before hooking up the editor and backend.