top of page

Kibbi Keeper

Steam_icon_logo.svg.png

Overview

  • Role: Programmer

  • Genre: 3D First-Person Virtual-Pet Exploration

  • Engine: Unreal 4

  • Team Size: 15 People

  • Development Time: 6 months

High Concept

Kibbi Keeper is a charming, first-person, virtual-pet, exploration game in which the player explores a long-forgotten valley while wrangling adorable, elemental creatures called Kibbi. Bond with these creatures, and immerse yourself in a beautiful environment to discover the fate of an ancient civilization that once resided here.

Responsibilities

  • Implemented the AI companions, Kibbi, with their interactions, emotions, and personalities.

  • Designed and implemented the unique AI interactions with the game environment, objects in the game, other AI companions, and players.

  • Implemented the AI patience system which controls AI's core behaviors.

  • Implemented the AI mood system that allows AIs to have different behaviors and facial expressions for different events.

  • Collaborated with three artists to design and create AI animations and implement blended animation trees for AIs.

The Kibbi

    Kibbi is a cute and lovely creature that lives in an old civilization where people and Kibbis are strongly connected. People who can train and teach Kibbis are called Kibbi Keepers. During the development stage, the biggest challenge for me is to make Kibbis feel alive. "Feeling alive" is a broad topic. It not only includes complicated AI behaviors, decisions, interactions, animations, and narratives, but also the transitions between behaviors and animations should feel natural and reasonable, while the game concepts were constantly changing and we had limited resources. I will talk through most of the AI systems I implemented in this project and also discuss some of the major challenges I met and how I solved them in the following sections.

Kibbi's Behaviors

    In Kibbi Keepers, players can only command Kibbis after they tame the Kibbis. Therefore, Kibbi needs to have two different behavior modes: wild and tamed. Each mode has an individual behavior tree that controls Kibbis' behaviors. The wild Kibbi lives in the environment and interacts with the environment while it can respond to platers' actions like attacking, moving away, and greeting. The tamed Kibbi should listen to the players while we also want them to still love to play. 

    The image below shows the wild fire Kibbi behaviors. Wild Kibbis will move around in their own areas. They also love fruits. Kibbi will try to find a fruit tree and look for any dropped fruits. Those natural behaviors can be noticed when players try to get close to them and give players a feeling that these creatures are really alive.

ezgif.com-gif-maker (1).gif

    Once players tame a Kibbi, they are now able to command the Kibbi to move, follow, or attack. While the Kibbis should follow players' commands, they also have other behaviors to show that they are not manipulated puppets but real alive creatures. For example, Kibbis will interact with the objects in the world like flowers, wisps, dropped fruits. They also love playing with toys. They will interact with other Kibbis. All of those complicated behaviors strongly form their personalities, characteristics, and souls. As one of Kibbi's creators, I spent the majority of my time implementing those behaviors, polishing details, and clearing all existing bugs.

    The image below demonstrates how players interact with the tamed Kibbis. Kibbis can follow the player's command quickly, and the animations of those behaviors play correctly and precisely.

ezgif.com-gif-maker (2).gif

Taming Events

    In that last section, I mentioned that Kibbis has two behavior modes: wild and tamed. Each mode has its own behavior tree to control Kibbi's behaviors. To tame a Kibbi, designers and I spent a lot of time discussing possible events that make this moment enjoyable and special. Therefore, there is a taming event that players need to pass through to tame the Kibbi. Also, we don't want to have the same events whenever players tame a Kibbi since there are six Kibbis total. Based on each Kibbi type's personality, designers and I designed three different taming events for fire Kibbis, ice Kibbis, and earth Kibbis.

    To implement those three unique taming events, each Kibbi type needs to have a different behavior tree and behaviors, while also the taming events should be interesting and challenging. The image below shows the partial process of the fire taming event. Players need to get close to the fire Kibbi and give him fruit to show that they are friendly. Fire Kibbi doesn't know players, so he will emit smoke and run away from the players. He will get exhausted after running for a while, which is a perfect chance for the players to tame him. The whole event process proceeds in the fire Kibbi's behavior tree, so even players move away from the Kibbi and come back later, the Kibbi can still do the same reactions and behaviors just like before.

ezgif.com-gif-maker (4).gif

    One of the challenges I had when implementing the fire taming even is how to let fire Kibbi runs away from the player smoothly in a narrow place. Since fire Kibbi needs to be in a close area to avoid it run into a weird place, the space that Kibbi can run is limited. We don't want players to catch up Kibbis quickly until they figure out the actual process. However, when implementing this feature, I realized that just letting Kibbis run in the opposite direction doesn't work well since it will be blocked by the wall / obstacles eventually. The code below illustrates my solution to this problem: whenever Kibbi's speed is lower than the default number, it will consider that the Kibbi is blocked by something, and it will find a proper direction and destination that is reachable in the navigation bound. By doing this, fire Kibbis can run away from the players immediately without getting stuck in front of the wall.

The Patience System

    The patience system is one of the key features that drive players to explore the game world. Patience, also called hunger, is shown as the green bar on the top left side. Each Kibbi has a patience value that will drop as time goes by. Feeding Kibbis fruit can increase the patience value. If Kibbi's patience is dropped to a certain value, it will move slower, and also more easily get distracted by other world objects like fruit trees. If the patience value gets to zero, Kibbi will be angry, play tantrum animations, and move to the closest fruit tree to seek fruits. Since players need Kibbis to solve puzzles, they need to collect fruits and feed Kibbis to maintain higher patience values. As the result, they move around, look for fruits, and find some hidden objects in corners like tablets, toys, and wisps.

 
    The image below demonstrates how the patience system affects Kibbi's behaviors. It moves slower than normal (the animation switches to the walk animation), plays the tantrum event, and goes to the nearest tree to seek fruits. I reused the seeking fruit functions that are in the wild Kibbi behavior trees, which saves half-day development time.

ezgif.com-gif-maker (6).gif

    One problem that I had when implementing this system is that the tantrum event has the highest priority over all other behaviors, which could cause many animation bugs and behavior bugs whenever the patience value gets to zero. Fortunately, the good thing about the behavior tree is that it runs from left to right. I put the tantrum behavior on the most left, and it will replace any existing behaviors whenever this event triggers. For the animation part, it will clear all the current animation states and transit to the tantrum state, and play the tantrum animation.

    Another issue is that since Kibbis have the same patience amount, they will enter the tantrum state at that same time, which is weird and can cause a lot of issues. To solve that, I changed the patience drop rate and amount slightly for each Kibbi when the game starts so that each tantrum event has at least 5-10 seconds time difference. 

The Emotion Response System

    As I mentioned before, Kibbis are able to interact with players, objects, toys, and other Kibbis. Interactions with players are handled by the command system, and playing with toys can be handled directly in the behavior tree. Those interactions have only a few cases, so we can implement those easily. However, there are many objects in the game world that Kibbis can interact with, and designers want to add new objects without creating many new functions and messing up with the existing systems. To solve this issue, another programmer, Jacob, and I implemented this emotion stimuli system that can handle all the objects vs Kibbis interactions.

    The system first defines how many emotions Kibbis can have and defines those emotions' responses. For example, if Kibbis is scared, it will play the scared animation and run away. To trigger this emotion, level designers can simply add the emotion stimuli component to any objects and set up the triggered emotion and the trigger radius. Whenever Kibbis enter this radius, it will trigger the emotion towards the object and react based on the emotion. 

    However, we don't want Kibbi to just stand there and do nothing after the emotional responses finish. Since the emotion responses can exist for more than 10 seconds, players will have a hard time understanding what's going on and where their Kibbis are. Therefore, it would be great to save the current command before responses and resume it after responses. The code below illustrates how I saved the current command information before setting up the emotions. Notice that many emotions are handled differently since they all have different cases. For example, the "attracted by fruits" emotion will not have any immediate response, so it will only set the emotion. 

The Kibbi Interaction System

    How Kibbi interact with others? This question was raised during the Alpha stage when we realized it would be better that Kibbis can interact with each other. Since we want to keep telling players that each Kibbi has its own unique personality, we designed three different interactions for each Kibbi type. However, unlike the taming event which I can separate all three events in different behavior trees, the interaction events need to have all Kibbis getting involved. Therefore, a Kibbi interaction system is needed to handle those complicated events. The image below shows an example of ice Kibbi interactions.

ezgif.com-gif-maker (7).gif

    The interaction events should have lower priority than many other behaviors and events since we don't want Kibbis to play the interaction animation while the players ask them to move to a location. It needs to be triggered in a moment that these Kibbis are free and players have time to watch those events. Also, another challenge is to have chances to trigger all three events without disrupting other events and animations.

    The code below shows how I handle the ice interaction. When the ice interaction triggers, it will notify all other Kibbis that there is an interaction they need to respond to. If they are in a looping animation like sleeping or sitting, they will ignore it. After notifying all the Kibbis, it will reset the interaction timer to avoid any other new interactions coming unless the timer elapses again.

Blending Animations and The Mood System

    In this project, I worked with the animation artists closely to create and design all Kibbi's animations. I also made some simple animations by myself. When creating those animations, I created two different animation state machines to separate the boy animations and the eye animations. The images below show the blending animations and also the function that handles Kibbi's blinking eyes. If the body animation has the eye part moving, then the eye state machine will have zero blending value. It can also create a simple blinking animation using the blending value calculated by time.

blendinganims.png

    Another advantage of the blending animations is that I could implement a mood system that controls Kibbi's eyes. Since eye animations are in a separate state machine, changing the mood will not affect any other interactions that I mentioned in the previous sections. The image below demonstrates how the mood system changes Kibbi's eyes to sad eyes while all other body animations still play perfectly.

ezgif.com-gif-maker (8).gif

Post Mortem

What Went Well

  • Multiple AI systems work with each other without triggering any serious bugs.

  • Many events that I designed are approved by the game designer and the programmer lead.

  • Animations play perfectly and transitions between animations run smoothly.

  • Communication between small steams is great. Especially the communication between animation artists and me.

  • Kibbis feel alive and cute.

  • Players are satisfied with Kibbis' behaviors.

What Went Wrong

  • Limited time causes many small bugs to still exist after the game launch.

  • Many animations are placeholder animations that I made since artists didn't have time to make those animations.

  • Game FPS sometimes is lower than 60 while we couldn't have time to improve the performance.

What Needs Work

  • Ask for resource requirements earlier.

  • Many variables and functions are still in the Kibbi class while they can be moved to other components to avoid checking conflicts.

  • More playtesting to find AI and animation bugs.

Overview
Responsibilities
The Kibbis
Kibbi's Behaviors
Taming Events
Patience System
Emotion Response System
Kibbi Interaction System
Blending Animations
Post Mortem
Kibbi Kepper
bottom of page