Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Unity 5.x Game AI Programming Cookbook

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

Product type Book
Published in Mar 2016
Publisher Packt
ISBN-13 9781783553570
Pages 278 pages
Edition 1st Edition
Languages
Author (1):
Jorge Palacios Jorge Palacios
Profile icon Jorge Palacios

Table of Contents (15) Chapters

Unity 5.x Game AI Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Behaviors – Intelligent Movement 2. Navigation 3. Decision Making 4. Coordination and Tactics 5. Agent Awareness 6. Board Games AI 7. Learning Techniques 8. Miscellaneous Index

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}