A closure-based behavior tree (BT) implementation

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
allsey87
Prole
Posts: 5
Joined: Mon Jul 29, 2019 9:37 am

A closure-based behavior tree (BT) implementation

Post by allsey87 » Mon Jul 29, 2019 9:46 am

Hi everyone,

I have created a minimalistic behavior tree library using Lua closures that some of you may be interested in. The repository is located on Github: https://github.com/allsey87/luabt

Unlike other implementations, this has been written from scratch in Lua (it is not a port from another library) and is designed for expressing complex behavior in a modular way. Please use the issue tracker on Github if you find any bugs or would like me to add any features.

Have fun!

User avatar
D0NM
Party member
Posts: 219
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: A closure-based behavior tree (BT) implementation

Post by D0NM » Mon Jul 29, 2019 10:52 am

It looks brilliant and produces well self explaining code.
Thank you.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Follow @Zabuyaki.
Twitter @FaMeSoft / GP32 Free Platformer: SUPER PLUSHA
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

allsey87
Prole
Posts: 5
Joined: Mon Jul 29, 2019 9:37 am

Re: A closure-based behavior tree (BT) implementation

Post by allsey87 » Tue Jul 30, 2019 2:12 pm

D0NM wrote:
Mon Jul 29, 2019 10:52 am
It looks brilliant and produces well self explaining code.
Thank you.
No problem! Let me know if you would like support for other node types. I have only implemented the absolute basics for the moment.

allsey87
Prole
Posts: 5
Joined: Mon Jul 29, 2019 9:37 am

Re: A closure-based behavior tree (BT) implementation

Post by allsey87 » Mon Sep 16, 2019 9:43 am

This library has been updated to include a selector* and a sequence* composite node. I also fixed a bug with the negate decorator node which became apparent during the testing of selector* and sequence*. The new composite nodes remember the state of their children while there is a child that is returning running. I have also added an advanced example which demonstrates how closures can be used to create local memory that can be used by a node.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests