
Learn behavior trees and the Behavior Designer tool to create modular, adaptive NPCs for a complete hide and seek game, evolving with other NPCs' behavior in Unity.
Build an autonomous identity game in Unity using behavior trees. Develop NPC movement, spider and sticker behaviors, adaptive AI through experience-based learning, UI metrics, and visual randomization.
You can buy the full Behavior Designer plug-in from Opsive WebSite
Or search it in the Unity Asset store...
Explore the behavior designer editor in a Unity project, creating nodes, sequences, and actions; locate scripts, view a log message, edit variables, and manage preferences, execution, and undo/redo.
Learn how the selector node in behavior designer executes child tasks from left to right, stops on first success, and returns failure if all fail, with debugging demos.
Explore sequence and selector nodes in Unity AI behavior trees: sequence stops on the first failure and returns success only if all succeed, while selector stops on the first success.
Explore building an action task in Behavior Designer for Unity AI, implementing an XM action with a custom script inheriting from Action, using OnUpdate and returning statuses, and logging messages.
Learn the condition task in a behavior tree, using a counter and compare number to return success, failure, or running.
Explore how to share data between behavior designer tasks using shared variables and the value property; feed and read the counter and round number between action and conditional tasks.
Learn how to reference task nodes in Behavior Designer to share data between action and conditional tasks by using public properties, selecting and linking tasks, and testing references in play.
Create a ground plane and multiple hiding spots, bake the nav mesh for ai navigation, and implement a hiding spot script and prefab to guide player concealment.
Create and configure an mpc npc in unity with a capsule collider, navmesh agent, visual body, and emissive ground plane guided by a level manager for hiders and seekers.
Configure the MPC movement script to drive a NPC on the navmesh surface, setting destination, sampling the target position, and enabling hearing, rotation, and patrol with move and run speeds.
Develop hiders’ behavior: start on the ground plane, search for hiding spots, mark occupied spots to prevent overlap, wait to be revealed by the seeker using the R key.
Build a behavior tree for a hider to hide behind a spot, using behavior designer variables like is hidden and seeker checkmarks to drive actions.
Teach NPCs to hide at randomized high spots by using behavior designer, find free hiding spots through level manager, and move to the chosen spot before hiding.
Create a reveal-triggered NPC behavior where NPCs run to the base and mark themselves when revealed by the seeker, using a checkmark blink and Behavior Designer tasks.
Learn to move hiders and seeker to a checkmark waiting position using a go-to-waiting-position action with a random offset, and manage game end and restart with the level manager.
Develop the seeker's autonomous behavior with a field of view and hearing to detect hiders, then chase and check them, and cycle to a new seeker after each round.
Build a seeker field of view in Unity using an fov object and a trigger collider to detect the player within a defined range, with gizmo visualization of bounds.
Execute a go to base for counting in a Unity autonomous game by building behavior designer trees, conditional checks, and position tasks for headers and seekers.
Implement a base-counting mechanic in Behavior Designer by creating a base count variable, a look-at object task, and a countdown that guides a seeker to the counting point.
Program a hider search in Unity by building header checks, inverter logic, and a Behavior Designer driven seeker that searches for hiding spots and reveals targets.
Develop a teacher-driven reveal and checkmark workflow for hiders, using conditional tasks, hider found flags, and a checkmark system to track revealed hiders.
Restart the round by resetting the behavior tree and sending hiders and the seeker to the start. The level manager selects a new seeker based on the kicked-out hider.
Set up a Unity UI to test game speed by building a background image, a game speed slider, and a UI manager that updates the timescale display in real time.
The lecture teaches completing the sticker functionality by using a level manager to pick the next NPC seeker and hider, and to prepare players for a new game.
Introduce enhanced hider AI that exits hiding when the seeker moves away, racing to the check mark base to improve interactivity and realism, aided by the seeker's hearing.
Implement a distance-check where hiders measure the distance to the speaker and to the base, and return success when the speaker distance exceeds the base distance plus add-on.
Coordinate a hide-and-seek AI where the MPC moves to a checkmark when the seeker is far from the base, and hiders wait at a counting position while rounds restart.
Discover MPC adaptation in a hide-and-seek game, where seekers and hiders learn from experience by marking hiding spots as a point of interest or avoidance.
Create a scriptable object based database to store points of interest and hider avoidance data for a unity ai game, including add, remove, and tick mechanisms for round based visibility.
Add seekers and hiders adaptation by enabling points of interest, hiding spots, and avoidance lists, managed through a level manager with a spot database and poi updates.
Create and feed a statistics scriptable object from NPCs and the level manager, then build a UI to display these stats and track rounds, speakers, and check marks.
Create a scriptable object to store MVP stats and define an NPC task data structure with fields like name, current state, market name, and average round time.
Build a stats UI in Unity to display NPC stats and a time counter. Update player stats and instantiate MPC stat panels from prefabs with check marks.
Learn to implement visual randomization for the MPC by adding randomized accessories and three visual styles, producing different appearances each playthrough with hats, hair, and eyeglasses.
Create the MPC visual style script to drive randomization of NPC visuals by selecting a random male or female tile and activating it on the MPC prefab.
Configure the male MPC prefab by creating and duplicating style groups with randomized features like eyeglasses, mouth, hats, and cigars. Prepare script-driven activation and female randomization in the next section.
Explore randomizing female character styles in a Unity scene by creating variants for head, hair, eyelashes, and eyeglasses, then deactivate alternatives to yield varied NPC appearances during play.
Unlock the potential of Artificial Intelligence in Unity by mastering Behavior Trees in this hands-on, practical course. Together, we’ll build a fully autonomous "Hide and Seek" game with Adaptive AI that learns and evolves.
Designed for beginner and intermediate game developers and designers with a passion for AI, this step-by-step course will guide you from the basics to advanced techniques.
We'll begin by exploring the fundamentals of Behavior Trees using the Behavior Designer plugin for Unity, setting a solid foundation. Then, we'll get our hands dirty by building simple AI examples to understand core concepts. From there, we’ll dive deep into the advanced area by creating our fully autonomous "Hide and Seek" game, where AI-driven characters will strategize and adapt without any player input. To enhance the gameplay experience, we'll create a UI that displays stats and information, making it easier to analyse AI behaviour. Finally, we'll take things to the next level by implementing AI adaptation, allowing our agents to learn from their experiences and adjust their behaviour dynamically using database techniques similar to machine learning.
This course includes a demo version of Behavior Designer, ensuring you have all the tools you need to succeed. Plus, you'll enjoy lifetime access to the course, allowing you to learn at your own pace and revisit the material whenever you need.
Join us on this exciting journey and take your AI development skills to new heights!