5th week, How to make the simple behaviour tree with the code
Hi guys,
until today, We made the enemy characters with a new design.
Yeap! We have most characters now.
And We made the enemy AI with the below explains.
and continue from the previous devlog, I am gonna talk about how to reduce IF-ELSE statements.
It is very important to avoid the spaghetti code. most SW Engineers try to avoid the spaghetti code to improve their code quality.
(Commonly, it shows why SW engineers didn't love the visual script)
We are just 2 guys indie game development team. one guy lives in LA. another guy lives in Seoul.
(IMOH, Leap Kang who lives Seoul is the greatest animator and pixel artist in my experience. His portfolio : https://www.artstation.com/kangsihyun )
We always try to reduce the budget. Most AI plugins' price is expensive. and we want to manage the code easier.
first, Let's think about Behaviour Tree. Simply, BT has 3 big components.
1. Blackboard: Parameters
2. Selector: It is like IF-ELSE. to find the fit condition.
3. Sequence: Tasks
and other major parts are "Wait for something to finish" and "Cancel"
- If we got multiple tasks at the same time, it is horrible. these parts are very important to fix the code.
in the last post, We talk new C# Pattern Matching statement.
We guess it makes the code simple.
And next problem is blocking the calling during executing the other code block.
We use the UniTask (https://github.com/Cysharp/UniTask )
When we test it, It works well.
Move -> Wait for reach or interrupt the Task -> Change status.
and the animation control component has played the animation with the current status.
We have to torch the AI part to remove the bugs now :)
See you next post!
Rapaces
Casual platformer action RPG
Status | Prototype |
Publisher | |
Author | crossbell |
Genre | Platformer, Action, Role Playing |
Tags | Escape Game, Pixel Art, Side Scroller, Speedrun |
Languages | English, Korean |
Accessibility | Subtitles |
More posts
- 20nd week, the tutorial build hereDec 09, 2022
- 18th week, 1st BOSSNov 27, 2022
- TECH TIP. How to make the parallax scrolling with the shaderNov 16, 2022
- 17th week, How to fix the tile gap on UnityNov 15, 2022
- 16th week, We added the title, prologue and the first event scene.Nov 10, 2022
- 15th week, Now We tested the cutsceneOct 31, 2022
- 14th week, Making the title and opening narrative scenesOct 24, 2022
- 13th week, We had changed our game title.Oct 18, 2022
- 12th week, the ink & inky, Unity dialogue systemOct 11, 2022
- 11th week, the hiding and the ladder featureOct 05, 2022
Leave a comment
Log in with itch.io to leave a comment.