How do puppets think?
Once we decided we were going to have other puppets to interact with, we knew that we needed some kind of Puppet Artificial Intelligence.
Building their brains felt a lot like taking the role of Ruben, the puppet maker, with the first prototypes being broken and crazy.
First batch of workers - Whatโs going on? ๐คช
Sometimes you start off with a simple plan for an AI that gets out of control with time, as the list of demands for the AI grows. The best idea is to start over. It will save you a lot of time. I had to redo the entire AI system at least 6 times.
Still not ideal, but hey! At least the puppets are moving! ๐
Thatโs more like it! Put the coin in the bucket! ๐ฐ
Archers should hit their targets! ๐น๐ฏ
Imagine being on the ground when a storm of arrows is flying past your head. It was clear that we needed archers that can actually hit their targets in the game. Easier said than done.
First version of archers - they rarely hit the player ๐ข
How would an archer predict where their arrows will land? They had to predict where the player will be, considering both the speed of the arrow and their target.
The solution was to calculate the projectile right when the archer lets go of it. Considering that the target will move at constant speed and then calculating the projectile and time it will take to land at the desired position.
After several iterations - archers that are accurate! White sphere = predicted positions at time of arrow launch. ๐
For anyone thatโs interested in building their own archers - this article greatly helped me understand ballistic trajectories - Solving Ballistic Trajectories
Thanks for reading this devlog entry, check back soon for more news! ๐ฒ
-G
1 comment