We may earn an affiliate commission when you visit our partners.
Penny de Byl and Penny Holistic3D

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 projects in this course have been tested and work with Unity 6.

Read more

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 projects in this course have been tested and work with Unity 6.

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.

Enroll now

What's inside

Syllabus

This section provides an overview of the course and gives you information about how to study it as well as seek assistance from the Holistic3D teaching team.
Read more

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

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

How to contact us

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

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.

By the end of this section you will have a better appreciation for the vehicle physics system in available in Unity and how to use it for building your own cars.

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.

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

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.

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.

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

By the end of this section you will have added special effects related to the driving of a car including skidding sounds, an engine and smoke.

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

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

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

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

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

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

In this section you will learn how to turn your vehicles into non-player characters that can navigate the track by themselves.

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.

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.

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.

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

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

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

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

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

By the end of this section you will have improved on the AI created in the previous section by developing an NPC with more believable driving behaviours.

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

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.

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

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

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

In this section you will add a heads-up display to the game complete with minimap, rear view camera and player names above cars.

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.

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

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

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

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

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

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.

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.

By the end of this section you will have learned how to implement an anti-cheating system into the racing track that can also keep track of player positions.

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.

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.

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

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

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.

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

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

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

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.

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

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.

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

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

By the end of this section you will have constructed a main menu screen where a player can select their vehicle and add their name.

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.

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

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.

By the end of this section you will have implemented the Photon Engine to add multiplayer functionality to the game.

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

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

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

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.

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

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

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

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

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.

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

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.

Find attached as a resource the final Kart project.

This section contains some final words from Penny and advice for the future.
Some Final Words From Penny

Where you should take your game development learning journey next.

This link provides further information on the courses you can look at taking based on your interests and skill level.

Save this course

Save Build A Multiplayer Kart Racing Game In Unity to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Build A Multiplayer Kart Racing Game In Unity with these activities:
Review Car Physics in Unity
Review the fundamentals of car physics in Unity to better understand the course's custom-built system.
Show steps
  • Study Unity's official documentation on Wheel Colliders and Rigid Bodies.
  • Experiment with different settings to observe their effects on vehicle behavior.
  • Create a simple test scene with a car and a basic track.
Brush up on C# Scripting
Review C# scripting fundamentals to ensure a solid understanding of the code used in the course.
Browse courses on C# Scripting
Show steps
  • Review basic C# syntax and data structures.
  • Practice writing simple scripts in Unity.
  • Familiarize yourself with Unity's API.
Prototype a Simple Kart Controller
Build a basic kart controller from scratch to reinforce the concepts taught in the course.
Show steps
  • Create a new Unity project.
  • Implement basic movement using Unity's input system.
  • Add simple collision detection.
  • Refine the controller for better handling.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Follow Unity's Networking Tutorials
Work through Unity's official networking tutorials to gain a deeper understanding of multiplayer game development.
Show steps
  • Find and select a relevant Unity networking tutorial.
  • Follow the tutorial step-by-step.
  • Adapt the tutorial to your own project.
Game Programming Patterns
Study common game programming patterns to improve code structure and maintainability.
Show steps
  • Read a chapter on a specific design pattern.
  • Implement the pattern in your kart racing game.
  • Reflect on the benefits and drawbacks of the pattern.
Document Your Kart Racing Game Development Journey
Create a blog or video series documenting your progress in building the kart racing game to solidify your understanding and share your knowledge.
Show steps
  • Choose a platform for your documentation.
  • Document each step of the development process.
  • Share your content with the community.
Contribute to a Unity Open Source Project
Contribute to an open-source Unity project to gain experience working with a team and improve your coding skills.
Show steps
  • Find an open-source Unity project on GitHub.
  • Identify an issue to work on.
  • Submit a pull request with your changes.

Career center

Learners who complete Build A Multiplayer Kart Racing Game In Unity will develop knowledge and skills that may be useful to these careers:
Unity Developer
A Unity developer uses the Unity game engine to create interactive experiences, ranging from video games to simulations. This course directly aligns with the skills needed to become a Unity developer, providing practical experience in building a complete kart racing game from scratch. Specifically, you will learn how to use Unity's physics system, create AI-driven characters, implement networking with Photon, and design user interfaces. The course's hands-on approach, combined with its coverage of essential Unity features, makes it an excellent choice for aspiring Unity developers. By working through the projects, you will gain a portfolio-worthy game and a strong foundation in Unity development.
Game Developer
A game developer brings video game concepts to life through programming, design, and testing. They can work on various aspects of a game, including gameplay mechanics, artificial intelligence, and user interfaces. This course on building a multiplayer kart racing game from scratch helps build a foundation in essential game development skills. By learning how to program car physics, create AI-driven cars, and implement networking with Photon, you can create engaging gameplay experiences. Furthermore, it is useful to learn about user interface design, covering elements like race track minimaps and player leaderboards, all of which contribute to creating a complete and immersive gaming experience. This course provides hands-on experience that is directly applicable to the work of a game developer.
Networking Programmer
A networking programmer focuses on implementing the multiplayer aspects of a game, ensuring smooth and reliable communication between players. This course directly addresses the needs of a networking programmer by teaching how to use the Photon API to set up a master server and add multiplayer functionality. Learning how to send remote procedure calls and instantiate networked objects are critical skills for creating a seamless multiplayer experience. Working through the course, you will gain hands-on experience with Photon, a popular networking engine, and learn how to implement the features needed for a functional multiplayer game. If you're interested in networking programming within game design, this course is a good starting point.
Gameplay Programmer
Gameplay programmers implement the interactive elements of a game, such as character movement, combat, and physics. This course directly addresses the skills needed to become a gameplay programmer by teaching you how to program car physics, design AI-driven characters, and implement user interface elements. The course's focus on creating a complete kart racing game provides a comprehensive understanding of the different systems that contribute to gameplay. You will gain hands-on experience in implementing the interactive features, such as car control, AI behavior, and player input. This course is particularly helpful for individuals who want to focus on the interactive elements that make a game fun and engaging.
Artificial Intelligence Programmer
An artificial intelligence programmer specializes in creating the behavior of non-player characters within a game. This course helps you develop the skills needed to design and implement AI for racing characters. Specifically, the course focuses on AI techniques used for creating NPC racing character behavior, which is highly valuable for an artificial intelligence programmer in the gaming industry. The course's emphasis on waypoint navigation, smart acceleration, braking, and avoidance behaviors directly translates to the challenges faced in creating believable and engaging AI opponents, making it an excellent choice for those seeking to specialize in this area. By completing this course, you gain practical experience in designing and programming AI systems.
User Interface Designer
A user interface designer is responsible for creating intuitive and visually appealing interfaces that enhance the player experience. This course provides valuable experience in user interface design by guiding you through the creation of a heads-up display that includes a rear view camera, minimap, and player leaderboard. Learning how to implement these elements, along with character selection screens and player name displays, are directly applicable to the work of a user interface designer. By mastering these skills, you can design interfaces that are both functional and visually appealing. This course is a useful launchpad for a career in user interface design.
Game Designer
A game designer conceptualizes and designs the overall gameplay experience, including the rules, mechanics, and story. This course provides insights into game design principles by guiding you through the creation of a complete kart racing game. Learning about car physics, AI opponents, and track design are valuable for understanding how different elements contribute to the overall gameplay. Furthermore, designing a user interface and implementing multiplayer functionality deepens your understanding of the player experience. This course offers a practical foundation in game design, allowing you to apply your knowledge and create engaging gameplay experiences.
Graphics Programmer
A graphics programmer specializes in creating visual effects and rendering techniques for video games and other applications. This course may be useful to graphics programmers by teaching you how to implement special effects such as skidding sounds, engine sounds, and smoke. These effects contribute to the visual and auditory experience of the game. Also, the course provides experience in working with particle systems, which are commonly used in graphics programming to create effects such as smoke, fire, and explosions. If you're interested in the visual aspects of game development, this course may provide a starting point.
Simulation Developer
A simulation developer creates realistic simulations for training, research, or entertainment purposes. This course may be useful for those interested in simulation development by teaching you how to model car physics and create AI-driven vehicles. While the course focuses on a kart racing game, the underlying principles of physics and AI can be applied to a variety of simulation scenarios. In particular, learning how to use Unity's wheel colliders and rigid bodies to create realistic vehicle movement is a valuable skill for simulation development. This course may provide a foundation in creating interactive simulations.
Extended Reality Developer
An extended reality developer creates immersive experiences using virtual reality, augmented reality, and mixed reality technologies. This course may be useful to extended reality developers by teaching you how to create interactive 3D environments and implement user interfaces. While the course focuses on a traditional gaming experience, the underlying principles of 3D development and user interaction can be applied to extended reality applications. In particular, learning how to use Unity to create a 3D game environment and implement user interface elements is a useful skill for creating immersive experiences. This course may provide a starting point for exploring extended reality development.
Mobile Game Developer
A mobile game developer creates games specifically designed for mobile devices, focusing on touch controls, performance optimization, and platform-specific features. This course may be useful to mobile game developers because it uses Unity, a cross-platform engine that supports mobile development. By learning how to build a kart racing game in Unity, you will gain experience in creating interactive experiences that can be deployed to mobile devices. Furthermore, learning how to optimize performance and implement touch controls are essential skills for creating successful mobile games. This course may provide a starting point for exploring mobile game development.
Software Engineer
A software engineer designs, develops, and tests software applications. This course may be useful to developing coding skills in software engineering. In particular, you will gain practical experience in programming car physics, creating AI-driven characters, and implementing user interfaces. The course emphasizes hands-on learning and provides a project-based approach to software development. This course provides useful skills. It offers a chance to build a functional game, which can be beneficial when beginning a career in software engineering.
Technical Artist
A technical artist bridges the gap between artists and programmers, developing tools and workflows that streamline the art creation process. This course may be useful for technical artists by teaching you how to work with Unity's physics system and implement special effects. In particular, learning how to use particle systems to create smoke effects and how to optimize the game's performance are valuable skills for technical artists. While the course focuses on game development, the underlying principles of technical art can be applied to a variety of creative projects. This course may provide a basic skillset.
Backend Developer
A backend developer builds and maintains the server-side logic and databases that power applications. This course may be useful to backend developers by teaching you how to use the Photon API to set up a master server and implement multiplayer functionality. Backend developers who work on multiplayer games may find this course useful in understanding the networking aspects of game development. Learning how to send remote procedure calls and instantiate networked objects are useful skills for creating a scalable and reliable multiplayer experience. This course may provide a foundation in the backend aspects of game development.
Sound Designer
As a sound designer, you create and implement audio elements in games. This course may be useful to sound designers by teaching you how to implement special effects such as skidding sounds and engine sounds. The course provides experience in working with audio assets and integrating them into a game environment. Furthermore, learning how to use procedural pitch control to make the car engine sound like it is changing gears is a valuable skill for creating realistic and immersive sound effects. This course may provide an introduction to audio implementation in games.

Featured in The Course Notes

This course is mentioned in our blog, The Course Notes. Read one article that features Build A Multiplayer Kart Racing Game In Unity:

Reading list

We've selected one books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Build A Multiplayer Kart Racing Game In Unity.
Provides a catalog of common design patterns used in game development. It can be a useful reference for structuring your code and improving its maintainability. While not specific to Unity, the patterns are applicable to any game engine. This book is more valuable as additional reading to improve your overall software engineering skills.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

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.

Affiliate disclosure

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.

© 2016 - 2025 OpenCourser