Beginner's Guide to AI (Unity 6 Compatible)
- Descrição
- Currículo
- FAQ
- Revisões
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 but all project has been tested and work in Unity 6.
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.
-
1Welcome to the CourseVídeo Aula
This lecture introduces the course by outlining all the content that will be covered with a section by section breakdown.
-
2Introduction to Artificial IntelligenceVídeo Aula
In this unit students will gain an understanding of the field of artificial intelligence and how it pertains to game development.
-
3Join the H3D Student CommunityVídeo Aula
H3D has a bustling online student community. Here's how to get involved.
-
4FAQsTexto
Important Reading on Common Issues students have and how to ask for help.
-
5Not So Scary Vector MathematicsVídeo Aula
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.
-
6Vector Mathematics Basics Cheat SheetTexto
-
7Test your vector mathematics knowledgeQuestionário
-
8Setting up Pathfinding in UnityVídeo Aula
In this video students will learn how to setup the AI Navigation package for the versions of Unity that it is not automatically included with. This package will be used later in this course.
-
9Updating to Unity 6Vídeo Aula
While this course was developed in a previous version of Unity, we've tested the projects and they work with Unity 6. This video is a guide to help you adjust your learning in this course to use Unity 6.
-
10The Cartesian planeVídeo Aula
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.
-
11Vectors Part 1Vídeo Aula
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.
-
12Vectors Part 2Vídeo Aula
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.
-
13Vectors Part 3Vídeo Aula
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.
-
14Calculating Distance Part 1Vídeo Aula
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.
-
15Calculating Distance Part 2Vídeo Aula
In this lecture students will learn how to use Unity methods to calculate distance.
-
16Calculating the Dot ProductVídeo Aula
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.
-
17Calculating the Angle Between VectorsVídeo Aula
In this lecture students will be challenged to calculate the angle between vectors to turn a game character to face another.
-
18Calculating the Cross ProjectVídeo Aula
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.
-
19A Simple Autopilot ProjectVídeo Aula
In this video students will be challenged to built an autopilot system to drive a character towards a goal and include turning in increments.
-
20A Simple AI Pet Challenge ProjectTexto
-
21TimeVídeo Aula
In this lecture students will examine the differing game loops that Unity runs and investigate how it affects the timing of character movements.
-
22Normalising Movement with TimeVídeo Aula
In this lecture students will learn how to smooth update values to give consistent rates of movement in game characters.
-
23VelocityVídeo Aula
In this lecture students will learn how to work with velocity to control the speed of a rigid body.
-
24Predicting Future Locations of Game Objects Part 1Vídeo Aula
In this lecture students will learn how to use velocity vectors to predict where a moving game object will be in the future.
-
25Predicting Future Locations of Game Objects Part 2Vídeo Aula
In this lecture students will complete the code that works with a quadratic equation to predict the hit location between a projectile and enemy.
-
26Acceleration Part 1Vídeo Aula
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.
-
27Acceleration Part 2Vídeo Aula
In this lecture students will add the shell to fire from the red tank and also program it to move under speed and acceleration.
-
28Acceleration Part 3Vídeo Aula
In this lecture students will complete their exploration of projectiles by examining drag and gravity.
-
29Trajectories Part 1Vídeo Aula
In this unit students will learn about the parabola formed by projectile motion and use physics calculations to start programming an automatic attacking tank.
-
30Trajectories Part 2Vídeo Aula
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.
-
31Trajectories Part 3Vídeo Aula
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.
-
32The A* Pathfinding Algorithm Part 1Vídeo Aula
In this lecture students will learn about the concepts behind the A* algorithm and take an in-depth look at its inner workings.
-
33The A* Pathfinding Algorithm Part 2Vídeo Aula
In this lecture students will write some preliminary code to get their project ready for the dedicated AStar method.
-
34The A* Pathfinding Algorithm Part 3Vídeo Aula
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.
-
35The A* Pathfinding Algorithm Part 4Vídeo Aula
In this lecture students will complete most of the code focused on running the A* algorithms logic.
-
36The A* Pathfinding Algorithm Part 5Vídeo Aula
In this lecture students will complete all but the last part of the code focused on running the A* algorithms logic.
-
37The A* Pathfinding Algorithm Part 6Vídeo Aula
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.
-
38WaypointsVídeo Aula
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.
-
39Slerping to the Direction of TravelVídeo Aula
In this lecture students will learn how rotational speed and waypoint accuracy affect an AIs ability to traverse waypoints.
-
40Following a CircuitVídeo Aula
In this lecture students will create copies of many tanks with different driving attributes and explore the issues that using waypoints may incur.
-
41Following a TrackerVídeo Aula
In this lecture students will create a tracker object that will make its way around a circuit while the tanks follow.
-
42Using A* with Waypoints Part 1Vídeo Aula
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.
-
43A Simple Graph API Part 1Vídeo Aula
In this lecture we will start writing a new set of classes to store a graph, with it's nodes and edges.
-
44A Simple Graph API Part 2Vídeo Aula
In this lecture students will learn how to introduce the A* algorithm into the graph class.
-
45A Simple Graph API Part 3Vídeo Aula
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.
-
46Using A* with Waypoints Part 2Vídeo Aula
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.
-
47Traversing a PathVídeo Aula
In this lecture students will implement a waypoint path following code for the tank NPC.
-
48Giving Commands to PathfindVídeo Aula
In this lecture students will complete programming the waypoint navigation system by adding command buttons to the environment.
-
49Setting up Wheel PhysicsVídeo Aula
In this lecture students will learn how to apply a wheel collider and rigid body to a tyre.
-
50Forces on WheelsVídeo Aula
In this lecture students will learn about wheel spring dampening and create a script to apply torque to the wheel.
-
51Constructing a Simple CarVídeo Aula
In this lecture students will learn how to construct a car physics object by combining wheel colliders with meshes.
-
52Turning the Steering WheelVídeo Aula
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.
-
53Creating A Circuit with WaypointsVídeo Aula
In this lecture students will learn how to setup a waypoint system to define a circuit for the AI car to drive around.
-
54Automatically Driving a Circuit Part 1Vídeo Aula
In this lecture students will learn how to get a simple car NPC up and driving around waypoints using a steering mechanic.
-
55BrakingVídeo Aula
In this lecture students will learn how to apply braking to slow a car as it approaches waypoints.
-
56Driving ForcesVídeo Aula
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.
-
57Improved Driving TacticsVídeo Aula
In this lecture students will learn how improve on the acceleration and braking based on the turning direction.
-
58Adding a Progress TrackerVídeo Aula
In this lecture students will learn how to add a progress tracker that can be used to guide the car around the track.
-
59Adding Antiroll StabilisingVídeo Aula
In this lecture students will learn how to add an antiroll bar onto the car to stabilising it from tipping over.
-
60Reconfiguring for Car Setting TestingVídeo Aula
In this lecture students will learn how they can reconfigure the AIController code to organise all the variable settings for their cars.
-
61Avoiding Other DriversVídeo Aula
In this lecture students will learn to create code to assist cars in avoiding other cars on the road.
-
62Improving Avoidance and ReversingVídeo Aula
In this lecture students will learn how to improve the avoiding behaviours and add reversing to their cars.
-
63Navigation Mesh IntroductionVídeo Aula
In this lecture students will learn about the principles and theory behind navigation meshes and how to construct one in Unity.
-
64From Waypoints to Navigation MeshesVídeo Aula
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.
-
65NavMesh Agents Part 1Vídeo Aula
In this lecture students will practice setting up a navigation mesh from scratch and program a simple AI agent.
-
66NavMesh Agents Part 2Vídeo Aula
In this lecture students will learn some code optimisation techniques as well as program in the animations to synchronise with agent movement.
-
67NavMesh Agents Part 3Vídeo Aula
In this lecture students will learn how to restrict agents from going into certain areas on a navmesh.
-
68Following a Player on a NavMeshVídeo Aula
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.
-
69Finite State MachinesVídeo Aula
In this lecture students will setup an environment ready for creating a finite state machine.
-
70Creating a State ClassVídeo Aula
In this lecture students will start coding for the environment and design a state class.
-
71PatrollingVídeo Aula
In this lecture students will write up the state code for Idle and Patrolling.
-
72Building the AI ClassVídeo Aula
In this lecture students will create the code to control the AI and provide an interface to the states.
-
73Chasing the Player Part 1Vídeo Aula
In this lecture students will begin developing code so the NPC can determine if it senses the player and then act on it.
-
74Chasing the Player Part 2Vídeo Aula
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.
-
75FSM ChallengeVídeo Aula
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.
-
76Seek and FleeVídeo Aula
In this lecture students will follow along to implement simple seek and flee methods for a Nav Mesh agent.
-
77PursuitVídeo Aula
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.
-
78EvadeVídeo Aula
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.
-
79WanderVídeo Aula
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.
-
80Hide Part 1Vídeo Aula
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.
-
81Hide Part 2Vídeo Aula
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.
-
82Hide Part 3Vídeo Aula
In this lecture students will learn how to implement code to stop the robber from moving if it can't see the cop.
-
83Complex BehavioursVídeo Aula
In this video students will learn how to combine a number of steering behaviours with simple geometric conditions to produce complex behaviours in agents.
-
84Behaviour ChallengeVídeo Aula
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.
