Posted August 22, 2022 by crossbell
#Action #stealth #platform #Platformer #pixel #AI
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.
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!