Git Product home page Git Product logo

activelogic-cs's Introduction

Active Logic

Build Status codecov

Easy to use, comprehensive Behavior Tree (BT) library built from the ground up for C# programmers:

  • Game logic, game AI (autonomous agents)
  • Asynchronous control applications
  • No DSL/builder pattern (tight integration)
  • Use standalone or borrow the "ticker" from a visual BT solution

=> Quick-start guide || Unity quick-start guide || API reference || FAQ

Introduction

Active Logic seamlessly integrates with C#:

class Duelist : UTask{

    float     health = 100;
    Transform threat;

    // BT selectors and sequences via || and &&
    override public status Step()
        => Attack()
        || Defend()
        || Retreat();

    // Conditionals without 'conditional nodes'
    status Attack() => (threat && health > 25) ?
        Engage(threat) && Cooldown(1.0f)?[ Strike(threat) ]
      : fail(log && $"No threat, or low hp ({health})");

    status Defend() => ...;

    // ...

}

> Complete sample

Active logic is the first BT library providing tight integration with the host language (no DSL, no builder pattern, no lambdas or coroutines, no blackboard). This means better performance (low/no GC), cleaner syntax and the freedom to structure your code as you wish.

Installation

Engine/platform agnostic:

  • dotnet add package ActiveLogic (via NuGet)

Unity 3D:

From source: no dependencies.

Language support

  • C# 7.2 or later

License

  • GNU Affero GPL v3.0. TLDR, use the software freely, provided derivative works are free, open source.
  • Unity Store Assets are covered by their end user license agreement.
  • Pending a standalone commercial license, read here

Where next?

activelogic-cs's People

Contributors

dherault avatar eelstork avatar

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.