Reader small image

You're reading from  Unity 5.x Game AI Programming Cookbook

Product typeBook
Published inMar 2016
PublisherPackt
ISBN-139781783553570
Edition1st Edition
Tools
Right arrow
Author (1)
Jorge Palacios
Jorge Palacios
author image
Jorge Palacios

Jorge Palacios is a software and game developer with a BS in computer science and eight years of professional experience. He's been developing games for the last five years in different roles, from tool developer to lead programmer. Mainly focused on artificial intelligence and gameplay programming, he is currently working with Unity and HTML5. He's also a game-programming instructor, speaker, and game-jam organizer.
Read more about Jorge Palacios

Right arrow

Implementing a self-driving car


What fun is a racing game without competitors? This is one of the most difficult subjects in artificial intelligence for games. It is usually tackled by creating cheater agents that disable certain limitations that are always imposed on the player, such as physics behaviors; this is because these limitations can create erratic or imprecise behaviors when evaluated by AI. In our case, we will approach the problem organically using techniques from a previous chapter.

Getting ready

In this chapter, we will explore how to create an autonomous car using advanced techniques from Chapter 1, Movement, such as following a path and avoiding walls. So, it is important to have grasped the knowledge behind them.

How to do it...

  1. Create an empty GameObject.

  2. Attach the Agent component.

  3. Attach the FollowPath component.

  4. Attach the WallAvoid component.

  5. Create the track using the track pieces with the PathNode component.

  6. Tag the track borders as walls.

  7. Make sure the track is complete.

How...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity 5.x Game AI Programming Cookbook
Published in: Mar 2016Publisher: PacktISBN-13: 9781783553570

Author (1)

author image
Jorge Palacios

Jorge Palacios is a software and game developer with a BS in computer science and eight years of professional experience. He's been developing games for the last five years in different roles, from tool developer to lead programmer. Mainly focused on artificial intelligence and gameplay programming, he is currently working with Unity and HTML5. He's also a game-programming instructor, speaker, and game-jam organizer.
Read more about Jorge Palacios