Do your non-player characters (NPCs) lack drive and ambition? Are they slow, stupid and constantly banging their heads against the wall? Then this course is for you. Join Penny as she explains, demonstrates and assists you in creating your very own NPCs in Unity with C#. All you need is a sound knowledge of Unity, C# and the ability to add two numbers together.
Do your non-player characters (NPCs) lack drive and ambition? Are they slow, stupid and constantly banging their heads against the wall? Then this course is for you. Join Penny as she explains, demonstrates and assists you in creating your very own NPCs in Unity with C#. All you need is a sound knowledge of Unity, C# and the ability to add two numbers together.
This course uses Unity Version 2021.3 LTS
In this course, Penny reveals the most popular AI techniques used for creating believable character behaviour in games using her internationally acclaimed teaching style and knowledge from over 30 years working with games, graphics and having written two award winning books on games AI. Throughout, you will follow along with hands-on workshops designed to teach you about the fundamental AI techniques used in today's games. You'll join in as NPCs are programmed to chase, patrol, shoot, race, crowd and much more.
Learn how to program and work with:
vectors
waypoints
navmeshes
the A* algorithm
crowds
flocks
animated characters
vehicles
and industry standard techniques such as goal-oriented action learning and behaviour trees.
Contents and Overview
The course begins with a detailed examination of vector mathematics that sits at the very heart of programming the movement of NPCs. Following this, systems of waypoints will be used to move characters around in an environment before examining the Unity waypoint system for car racing with AI controlled cars. This leads into an investigation of graph theory and the A* algorithm before we apply these principles to developing navmeshes and developing NPCs who can find their way around a game environment. Before an aquarium is programmed complete with autonomous schooling fish, crowds of people will be examined from the recreation of sidewalk traffic, to groups of people fleeing from danger. Having examined the differing ways to move NPCs around in a game environment, their thinking abilities will be discussed with full explanations and more hands-on workshops using finite state machines and behaviour trees.
The follow-along workshops included in the course come with starter Unity asset files and projects complete with solutions. Throughout, there are also quizzes and challenge exercises to reinforce your learning and guide you to express your newfound knowledge.
At the completion of this course you will have gained a broad understanding of what AI is in games, how it works and how you can use it in your own projects. It will equip you with a toolset to examine any of the techniques presented in more depth to take your game environments to the next level.
What students are saying about this course:
This has been my favourite Udemy-Unity course so far. It took me from literally 0% knowledge of how game AI is achieved, and took me to a whole new level. Waypoints, pathfinding, state machines, etc etc etc are all covered in-depth and will reveal the magic (spoiler alert: it isn't magic) behind making your computer characters seem like they really have a mind of their own.
Oh My God. I love her way of teaching things. I haven’t finished this course yet. But all i can say is that it is another brilliant course from her. Artificial intelligence by itself is a tricky thing to do. And before starting this course i never thought that i will understand anything in it. But i was wrong. With her style of teaching, you will learn how to move your characters in an ”intelligent“ way. This course is perfectly sliced and the pace is wonderful.
This lecture introduces the course by outlining all the content that will be covered with a section by section breakdown.
In this unit students will gain an understanding of the field of artificial intelligence and how it pertains to game development.
H3D has a bustling online student community. Here's how to get involved.
Important Reading on Common Issues students have and how to ask for help.
In this lecture we will get an overview of vectors and why they are an important concept to have an understanding of before you launch into programming the movement of an NPC.
In this lecture students will learn about the Cartesian coordinate system and how points are defined in the space as well as 2D and 3D nature of a game environment.
In this video students will begin an exploration of vectors and discover their importance in measuring game environment space as well as defining direction of movement of game characters.
In this lecture students will learn how to normalise the movement of a game character by calculating a velocity to gradually move it from one location to another.
In this lecture students will learn how to determine the size of a vector to determine when a character has reached its goal as well as have AI characters follow a player character.
In this lecture students will learn to use Pythagorus' theorem to calculate the distance between points in a game environment and the length of a vector.
In this lecture students will learn how to use Unity methods to calculate distance.
In this lecture students will learn about the derivation of the dot product formulae and how it is used to calculate the angle between vectors for the purposes of rotating a game character.
In this lecture students will be challenged to calculate the angle between vectors to turn a game character to face another.
In this video students will learn about the derivation of the cross product and discover why it is important to include in processes involving the rotation of characters.
In this video students will be challenged to built an autopilot system to drive a character towards a goal and include turning in increments.
In this lecture students will examine the differing game loops that Unity runs and investigate how it affects the timing of character movements.
In this lecture students will learn how to smooth update values to give consistent rates of movement in game characters.
In this lecture students will learn how to work with velocity to control the speed of a rigid body.
In this lecture students will learn how to use velocity vectors to predict where a moving game object will be in the future.
In this lecture students will complete the code that works with a quadratic equation to predict the hit location between a projectile and enemy.
In this unit students will be introduced to acceleration as a means of calculating the shell's velocity and also introduced gravity into the equation.
In this lecture students will add the shell to fire from the red tank and also program it to move under speed and acceleration.
In this lecture students will complete their exploration of projectiles by examining drag and gravity.
In this unit students will learn about the parabola formed by projectile motion and use physics calculations to start programming an automatic attacking tank.
In this lecture students will learn how to calculate the trajectory of an arc made by a moving physics object to determine a hit location.
In this lecture students will learn how to use the trajectory calculations to have a Unity Physics system operated bullet hit its mark as well as create a simple AI character that will shoot at and follow an enemy.
In this lecture students will learn about the concepts behind the A* algorithm and take an in-depth look at its inner workings.
In this lecture students will write some preliminary code to get their project ready for the dedicated AStar method.
In this unit students will begin writing the A* algorithm by creating a start and goal location as well as marking them inside a maze.
In this lecture students will complete most of the code focused on running the A* algorithms logic.
In this lecture students will complete all but the last part of the code focused on running the A* algorithms logic.
In this lecture students will finalise their A* Pathfinding code to search from a starting location to an ending location and then determine the path points between them.
In this unit students will learn about waypoints, how to place them on a map to form a circuit and how to program a vehicle to automatically navigate between them.
In this lecture students will learn how rotational speed and waypoint accuracy affect an AIs ability to traverse waypoints.
In this lecture students will create copies of many tanks with different driving attributes and explore the issues that using waypoints may incur.
In this lecture students will create a tracker object that will make its way around a circuit while the tanks follow.
In this lecture students will learn how to setup waypoints on a map that can later be used with the A* algorithm for finding a path around an environment.
In this lecture we will start writing a new set of classes to store a graph, with it's nodes and edges.
In this lecture students will learn how to introduce the A* algorithm into the graph class.
In this lecture students will complete writing the Graph class with the A* Algorithm code and be ready to continue working on the waypoint system.
In this lecture students will learn how to add the waypoints and edges to the graph and begin programming the AI code for their NPC.
In this lecture students will implement a waypoint path following code for the tank NPC.
In this lecture students will complete programming the waypoint navigation system by adding command buttons to the environment.
In this lecture students will learn how to apply a wheel collider and rigid body to a tyre.
In this lecture students will learn about wheel spring dampening and create a script to apply torque to the wheel.
In this lecture students will learn how to construct a car physics object by combining wheel colliders with meshes.
In this lecture students will learn how to turn the wheel collider so the front wheels can be used to determine a direction of travel.
In this lecture students will learn how to setup a waypoint system to define a circuit for the AI car to drive around.
In this lecture students will learn how to get a simple car NPC up and driving around waypoints using a steering mechanic.
In this lecture students will learn how to apply braking to slow a car as it approaches waypoints.
In this lecture students will learn about the forces placed on tires when driving and create code to flip the cars over when they flip onto their roof.
In this lecture students will learn how improve on the acceleration and braking based on the turning direction.
In this lecture students will learn how to add a progress tracker that can be used to guide the car around the track.
In this lecture students will learn how to add an antiroll bar onto the car to stabilising it from tipping over.
In this lecture students will learn how they can reconfigure the AIController code to organise all the variable settings for their cars.
In this lecture students will learn to create code to assist cars in avoiding other cars on the road.
In this lecture students will learn how to improve the avoiding behaviours and add reversing to their cars.
In this lecture students will learn about the principles and theory behind navigation meshes and how to construct one in Unity.
In this lecture students will learn how to convert a waypoint system to use the Navigation Mesh API that comes with Unity to achieve the same thing.
In this lecture students will practice setting up a navigation mesh from scratch and program a simple AI agent.
In this lecture students will learn some code optimisation techniques as well as program in the animations to synchronise with agent movement.
In this lecture students will learn how to restrict agents from going into certain areas on a navmesh.
In this lecture students will learn how to program AI navmesh characters to follow a player character in addition to using off mesh links to traverse gaps in the navmesh.
In this lecture students will setup an environment ready for creating a finite state machine.
In this lecture students will start coding for the environment and design a state class.
In this lecture students will write up the state code for Idle and Patrolling.
In this lecture students will create the code to control the AI and provide an interface to the states.
In this lecture students will begin developing code so the NPC can determine if it senses the player and then act on it.
In this lecture students will complete the AI code that will cause the NPC to chase and shoot at the player as well as lose interest if the player goes out of range.
In this lecture students will be challenged to add a new state into the NPCs behaviour to make it run away when it is threatened.
In this lecture students will follow along to implement simple seek and flee methods for a Nav Mesh agent.
In this lecture students will learn the difference between seeking and pursuit and be able to add predictive code to their agent to make assumptions about where the target will be in the future.
In this unit students will be challenged to create their own evade method which will see the agent move away from the predicted location of the target.
In this unit students will examine one method of producing a wandering behaviour that will have the agent freely walk around the environment with smooth randomness.
In this video students will take a look at the basics behind the hide behaviour. In it we will create a simple hide method that will have the agent hide behind the closest obstacle in the environment.
In this unit students complete the development of the hiding behaviour and work to calculate a more accurate hiding location and reduce the number of calls to the method in the update.
In this lecture students will learn how to implement code to stop the robber from moving if it can't see the cop.
In this video students will learn how to combine a number of steering behaviours with simple geometric conditions to produce complex behaviours in agents.
In this video students will be challenged to integrate the wander behaviour into the complex behaviour to have the agents go into a wander when the target cop is out of range.
In this lecture students will learn about the dynamics of crowd behaviour and watch some simple simulations.
In this lecture students will set up a navmesh with numerous animated humanoid agents and begin programming a crowded street scene.
In this lecture students will finalise their work on creating a crowded city scape where humanoid agents walk from one end of a sidewalk to another.
In this lecture students will setup a project to drop an obstacle into the scene that the agents in the crowd will flee from.
In this lecture students will complete the fleeing simulation by adding code to the agents controller to calculate a flee direction.
In this lecture students will learn how the flocking algorithm works and begin setting up a project to create a schooling fish simulation.
In this lecture students will write a basic flocking algorithm to create a school of fish.
In this lecture students will learn how to add a goal position to the flocking simulation.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.