An open API service indexing awesome lists of open source software.

https://github.com/bentlemon/dog-knight-basic-behaviour-tree

Just a showcase of a behaviour tree implementation in Unity!
https://github.com/bentlemon/dog-knight-basic-behaviour-tree

ai behaviour-tree game-development gamedev unity unity3d

Last synced: about 2 months ago
JSON representation

Just a showcase of a behaviour tree implementation in Unity!

Awesome Lists containing this project

README

        

# Dog Knight! U・ᴥ・U
## Description
A simple behaviour tree implementation in Unity (2022) with patrol and attack!

What he does:
* Random patrol pattern with random waiting time
* Detect enemies & walks to them
* Slays his enemies!!

### Code
Originally uploaded to Gitlab, only asset code is provided here!!

## Tree setup for Dog Knight
Dog knight has a simple tree setup that is the following:
```
Node root = new Selector(new List
{
new Sequence(new List {
new EnemyInFOVRange(transform),
new GoToTargetAction(transform),
new EnemyInAttackRange(transform),
new AttackAction(transform)
}),
new PatrolAction(transform),
});
```

## Demo Video
Click the following image to see the result! :)

[![Dog Knight Demo Video](https://img.youtube.com/vi/BLsSRWvRAQ4/0.jpg)](https://www.youtube.com/watch?v=BLsSRWvRAQ4)

## 3D Assets used
- https://assetstore.unity.com/packages/3d/environments/stylized-hand-painted-dungeon-free-173934
- https://assetstore.unity.com/packages/3d/characters/animals/dog-knight-pbr-polyart-135227
- https://assetstore.unity.com/packages/3d/characters/animals/insects/fantasy-spider-236418
- https://assetstore.unity.com/packages/3d/props/crate-31462
- https://assetstore.unity.com/packages/3d/props/barrels-32975