Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Unity Artificial Intelligence Programming - Fifth Edition

You're reading from  Unity Artificial Intelligence Programming - Fifth Edition

Product type Book
Published in Mar 2022
Publisher Packt
ISBN-13 9781803238531
Pages 308 pages
Edition 5th Edition
Languages
Author (1):
Dr. Davide Aversa Dr. Davide Aversa
Profile icon Dr. Davide Aversa

Table of Contents (17) Chapters

Preface 1. Part 1:Basic AI
2. Chapter 1: Introduction to AI 3. Chapter 2: Finite State Machines 4. Chapter 3: Randomness and Probability 5. Chapter 4: Implementing Sensors 6. Part 2:Movement and Navigation
7. Chapter 5: Flocking 8. Chapter 6: Path Following and Steering Behaviors 9. Chapter 7: A* Pathfinding 10. Chapter 8: Navigation Mesh 11. Part 3:Advanced AI
12. Chapter 9: Behavior Trees 13. Chapter 10: Procedural Content Generation 14. Chapter 11: Machine Learning in Unity 15. Chapter 12: Putting It All Together 16. Other Books You May Enjoy

Developing the basic game structure

For this demo, we will write an AI for the free tutorial game TANKS!. You can download the base game from Unity Asset Store (https://assetstore.unity.com/packages/essentials/tutorial-projects/tanks-tutorial-46209), or follow along with the version included in the Chapter 12 folder of this book's GitHub repository. The version included with this book has the advantage of already having been tested for Unity 2022.

In either case, the game is the same. When we start the game, we see a pleasant desert scenario, with rocks, structures, palm trees, and so on. Using the keyboard, we should be able to control the blue tank (the tank moves with W, A, S, and D and shoots with the Spacebar).

The following screenshot shows the basic structure of the game:

Figure 12.1 – Basic hierarchy of the game

The first time you start with an existing project, spend as much time as you can familiarizing yourself with the game structure...

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 $15.99/month. Cancel anytime}