Build A Multiplayer Kart Racing Game In Unity V.2019
4.6 (213 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,132 students enrolled

Build A Multiplayer Kart Racing Game In Unity V.2019

Learn all about vehicle physics, game mechanics, AI, and networking for multiplayer kart racing experiences.
4.6 (213 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,132 students enrolled
Last updated 12/2019
English
English [Auto-generated]
Current price: $13.21 Original price: $34.99 Discount: 62% off
5 days left at this price!
30-Day Money-Back Guarantee
This course includes
  • 14.5 hours on-demand video
  • 2 articles
  • 31 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • How to use Unity's Vehicle Physics system to create a four wheeled vehicle from scratch.
  • How to implement the Photon Networking Service in Unity Games.
  • Artificial Intelligence techniques relevant to racing mechanics.
Course content
Expand all 65 lectures 14:21:06
+ Introduction
3 lectures 06:39

In this video Penny gives an overview to all the components taught in the course.

Preview 04:59

H3D has a bustling online student community.  Here's how to get involved.

Join the H3D Student Community
01:15

Here's how to get the best experience from studying this course and answers to some popular student questions.

FAQs
00:25
+ Vehicle Setup
5 lectures 01:34:16

In this lecture we will begin taking a close look at the Unity wheel collider that will be the basis for our vehicle physics system.

Preview 20:06

In this lecture we will continue to explore the suspension system and begin writing some code to drive the wheels forward and back.

Wheel Physics Part 2
18:27

In this lecture we will take a closer look at the structure of the car game object and program in the functionality to turn the wheels.

Wheel Physics Part 3
18:43

In this lecture we will finish writing the drive code so it is on a single game object and start working on rigging up a kart model.

Wheel Physics Part 4
19:59

In this lecture we will add braking and friction mechanics to the drivable car.

Driving Mechanics
17:01
+ Vehicle Special Effects
6 lectures 01:19:58

In this lecture we will start adding special effects to the driving mechanics in the form of skidding audio and visuals.

Preview 20:20

In this lecture we will examine an alternative way to improve the skid mark effect.

Improved Skidding
09:56

In this lecture we will setup particle systems to attach to the wheel colliders to produce smoke when skidding occurs.

Wheel Smoke
15:28

In this very short lecture we will add a brake light to turn on when the car is braking.

Brake Lights
04:07

In this video we will discuss how procedural pitch control can be used to make the car engine sound like it is changing gears.

Revving the Engine Part 1
19:58

In this lecture we will wrap up the special effects for the vehicle and set the sounds for a 3D environment.

Revving the Engine Part 2
10:09
+ Basic NPC Vehicle Behaviour
8 lectures 01:57:12

In this lecture we will separate out the human player controls from the NPC controls that are needed for adding artificial intelligence to self driving karts.

Changing Drivers
04:51

In this lecture I will show you how to create a  racing circuit constructed from a series of waypoints along with gizmos to help you visualise the path.

Waypoints
10:18

In this lecture we will begin work on the AI controller and have it determine its path around a set of waypoints by setting the steering angle, acceleration and amount of braking.

Driving a Circuit with an NPC
19:13

In this lecture we will create the racing track and add in some code to automatically flip cars when they roll.

Auto Flipping
16:29

In this lecture we will add a stabilising bar to the vehicle to transfer force from one wheel to another to help prevent flipping.

Preview 17:03

In this lecture we will start working on a smarter braking system.

Normalised Braking Part 1
19:23

In this lecture we complete the majority of the braking code by considering the sharpness of turns and speed of the vehicle.

Normalised Braking Part 2
12:34

In this lecture we will be adding in acceleration as a dynamic value within the AIController class.

Acceleration
17:21
+ Improved NPC Vehicle Behaviour
5 lectures 01:23:09

In this lecture we will examine a very basic waypoints traversal system that will become the basis for improving on our NPC car performance.

Cars on Rails
12:44

In this lecture we will device a smoother system for allowing the NPC to follow a set of waypoints that also allows it to skip a waypoint and stay on track.

Preview 18:19

In this video we will complete the NPC driving code with respect to it tracking around the waypoints.

Controlling Tracking Braking and Acceleration
15:20

In this lecture we will build in avoidance steering to the NPC vehicles to allow them take action when colliding with another car.

Avoid Other Drivers
17:38

In this lecture we will examine ways to get a car unstuck when it runs into an obstacle and can't move.

Getting Unstuck
19:08
+ Graphical User Interface
8 lectures 01:55:19

In this lecture we will add the first part of the graphical user interface that will show a countdown at the beginning of the race.

The Starting Signal
19:45

In this video we will workout getting the player character car unstuck and ensure it doesn't start driving before the race begins.

A Couple of Challenges
15:23

In this lecture we will modify the camera following code to allow switching between first and third person view.

First and Third Player Switching
10:59

In this lecture we will start building the HUD for the game beginning with the rear view camera.

The Heads Up Display Part 1
13:15

In this lecture we will complete the minimap component and add overhead arrows to show the car positions on the map.

The Heads Up Display Part 2
14:23

In this lecture we will create code to make the HUD elements visible or not visible depending on the player's preferences.

The Heads Up Display Part 3
07:53

In this lecture we will create a text prefab that will attached to a vehicle and follow the car around to display the driver's name.

Displaying the Players Name Part 1
19:24

In this video we will complete the player names display by culling names when they are out of camera view and adding random names to the AI controlled cars.

Displaying the Players Name Part 2
14:17
+ Counting Laps
13 lectures 02:44:09

In this video we will setup the game map with a checkpoint system that will assist in preventing cheating and also determine which player is winning.

Setting up a Checkpoint System
19:56

In this video we will create a checkpoint monitor for each car so it can determine where on the track it is and help us to avoid players cheating.

Detecting Checkpoints
09:16

In this lecture we will add a lap counter and then observe the behaviour of cars with respect to hitting all the checkpoints.

Displaying Checkpoint and Lap Counter
09:22

In this lecture we will take a close look at how to setup the game environment to ensure cars go through all the checkpoints.

Checking the Checkpoints
15:08

In this video we will look at one way to setup the checkpoints on the track as well as update the player controller code to allow resetting at checkpoints.

Checking out the Player
12:14

In this lecture we will take the lap and checkpoint count and turn them into the place positions of First, Second, Third and Fourth.

Calculating Places Part 1
18:32

In this lecture we will complete the place calculating system and update it's display font.

Calculating Places Part 2
06:14

In this video you will learn how to display the places of all players on a UI leaderboard.

Displaying the Leaderboard
14:31

In this set of challenges we will cover some of the common issues that have arisen during development of this game, ones you might experience and how to fix them.

Getting Cars Out of Trouble Challenges
17:14

In this article you will learn how to modify the SmoothFollow script to change the camera to any of the AI players.

Cycling Camera through AI Players
08:45

In this lecture we will program in the end of race conditions to stop drivers going around the track after they've finished the required number of laps.

Who's the Winner
09:56

In this lecture we will build and program in the game over screen with a replay button.

Game Over
19:55

In this lecture we will take a quick look at dealing with the resetting of static values when a scene is reloaded.

Resetting the Leaderboard
03:06
+ Custom Play
3 lectures 59:30

In this lecture we will construct prefabs from the cars we've built throughout the course to make the game more flexible for player choice of vehicle as well as instantiating networked players.

Creating Car Prefabs
19:58

In this lecture we will start working on a main menu to enter a player name and select a car.

Creating a Main Menu Screen
19:54

In this lecture we will complete the player name setting and selection of player cars and pass this information through to the main game scene.

Selecting a Car
19:38
+ Networking
12 lectures 02:07:49

In this lecture you will learn how to setup a Photon Master Server and connect to it with your game in Unity.

Photon Network Setup
19:59

In this lecture we will examine the nature of computer networks and the main types used with games.

Understanding Networks
06:34

In this lecture we will construct a set of vehicle prefabs with network components required by Photon.

Photon Prefabs
12:36

In this video we will begin to separate out the single player and multiplayer functionality by adding a button to start the race when networked players are ready.

Starting a Multiplayer Game
11:25

In this lecture we will write enough code to start testing the network setup with two clients and their vehicles.

Creating Networked Players
17:33

In this lecture we will complete writing the Networked Player code to ensure the correct names and places are written above all players.

Creating Networked Names
06:22

In this short lecture we will examine the difference between local players and connected clients.

Understanding Players and Clients
03:11

In this lecture we will coordinate the game start countdown on all clients using remote procedure calls.

Starting the Race on External Clients
12:14

In this lecture you will learn how to add networked AI vehicles to the race and synchronise their names by passing data with prefab instantiation.

Adding Networked AI Players
19:06

In this lecture we will go back and fix the code that we took out of the leaderboard to cope with networked play.

Don't Forget the Leaderboard
04:50

In this lecture we will address some issues that arise when trying to restart a networked race to ensure all values and players are reinitialised without losing connection.

Resetting the Networked Race
13:55

Find attached as a resource the final Kart project.

Final Kart Project
00:04
+ Final Words
2 lectures 13:04
Some Final Words From Penny
01:48

Where you should take your game development learning journey next.

Bonus
11:16
Requirements
  • Have a solid understanding of C#
  • Be familiar with the Unity Game Engine
Description

Build a Multiplayer Kart Racing Game From Scratch in Unity will use Unity 2019 and Photon networking tools to take you step-by-step through the setup and development of your own go-kart experience.

The kart racing genre goes back to the 1980s, though it was popularised by Super Mario Kart (1992) and Crash Team Racing (1999). The genre mixes racing and arcade type mechanics with well-known fictional characters and funky tracks littered with pickups and obstacles. Creating such a game combines the skills of networking, artificial intelligence, interface design, special effects and audio.

In this course, Penny reveals the most popular AI techniques used for creating NPC racing character behaviour in games using her internationally acclaimed teaching style and knowledge from over 25 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 take you through every step of putting together your own kart racing game.  You will first construct from scratch a single-player experience with intelligent NPC components and then add on networking functionality with a Photon master server to create a multiplayer game.

Learn how to program and work with:

  • Car physics and controllers built from the ground up with Unity's wheel colliders and rigid bodies;

  • AI driven cars with waypoint navigation, smart acceleration & braking and avoidance behaviours;

  • Race Track Mini-maps with Player positions, rear view cameras and leaderboards;

  • Networking with Photon including setting up a master server, remote procedure calls and networked object instantiation;

  • Character selection for vehicle types and player names; and

  • Graphical User Interfaces.

Contents and Overview

The course begins with a detailed explanation of Unity's vehicle physics system.  A four-wheeled car will be constructed from scratch using wheel colliders and rigid bodies in which every setting is explored and all possible functionality tested and put through its paces to get the right balance of skid, acceleration, braking and weight. This system will then be transferred to a top quality Kart model and placed in a racing track environment in which artificial intelligence mechanics will be added to develop non-player character vehicles who can effectively drive around the track while avoiding or in some cases aggressively bumping other players.

You will work your way up to a completed kart racing single player game in which one player takes on three NPCs.  Race places will be calculated and a heads-up display (HUD) containing a rear view camera, minimap and player leaderboard will be added.  You'll also learn how to implement a camera-following script that you can use to switch between players for differing points of view.

Once the single player game is completed, the Photon API will be used to set up a master server and then add multiplayer functionality to the game so you can then play it with your friends.  You will learn how to create your own server, send remote procedure calls to other players and instantiate networked objects, some of them AI characters.

At the completion of this course you will have covered a wide variety of game development techniques from artificial intelligence, networking and user interface creation.  The knowledge and skills you acquire will be applicable across numerous game genres and stand you in good stead for adding advanced functionality to your own game projects.

What students are saying about Penny's courses:

  • Dr.Penny is a wonderful person and a true expert. All of her courses I've taken have been top notch and in my opinion there is no better teacher out there. Her upbeat personality makes you feel as if you're listening to a friend than just another monotone teacher.

  • This is my first course I've ever bought for Unity as I've tinkered for years with Unity and not really done anything , but I'm only 27% through the course and I've already learned so many new things, it's really opened my eyes to the power of Unity. I've followed Penny for a while now on YouTube and she is a brilliant instructor, very clear on the code you're writing and explaining how it all works.

  • I really appreciate the clarity. I've had many dabblings with learning how to code previously and have found my knowledge comes and goes. This time around, the concepts are really sticking. There is something to the Holistic3D method!


Who this course is for:
  • Beginner game developers interested in seeing what goes into constructing an entire game.
  • Experienced Unity developers wanting to know how to make their games multiplayer using the Photon Engine.
  • All game developers wanting to know more about the artificial intelligence techniques used in character navigation and movement.