Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Unity 2021 Game Development

You're reading from   Hands-On Unity 2021 Game Development Create, customize, and optimize your own professional games from scratch with Unity 2021

Arrow left icon
Product type Paperback
Published in Aug 2021
Publisher Packt
ISBN-13 9781801071482
Length 710 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nicolas Alejandro Borromeo Nicolas Alejandro Borromeo
Author Profile Icon Nicolas Alejandro Borromeo
Nicolas Alejandro Borromeo
Arrow right icon
View More author details
Toc

Table of Contents (29) Chapters Close

Preface 1. Section 1 – Our First Level
2. Chapter 1: Designing a Game from Scratch FREE CHAPTER 3. Chapter 2: Setting Up Unity 4. Chapter 3: Working with Scenes and Game Objects 5. Chapter 4: Grayboxing with Terrain and ProBuilder 6. Chapter 5: Importing and Integrating Assets 7. Section 2 – Improving Graphics and Sound
8. Chapter 6: Materials and Effects with URP and Shader Graph 9. Chapter 7: Visual Effects with Particle Systems and Visual Effect Graph 10. Chapter 8: Lighting Using the Universal Render Pipeline 11. Chapter 9: Fullscreen Effects with Postprocessing 12. Chapter 10: Sound and Music Integration 13. Chapter 11: User Interface Design 14. Chapter 12: Creating a UI with the UI Toolkit 15. Chapter 13: Creating Animations with Animator, Cinemachine, and Timeline 16. Section 3 – Scripting Level Interactivity with C#
17. Chapter 14: Introduction to C# and Visual Scripting 18. Chapter 15: Implementing Movement and Spawning 19. Chapter 16: Physics Collisions and Health System 20. Chapter 17: Win and Lose Condition 21. Chapter 18: Scripting the UI, Sounds, and Graphics 22. Chapter 19: Implementing Game AI for Building Enemies 23. Chapter 20: Scene Performance Optimization 24. Section 4 – Releasing Your Game
25. Chapter 21: Building the Project 26. Chapter 22: Finishing Touches 27. Chapter 23: Augmented Reality in Unity 28. Other Books You May Enjoy

Chapter 19: Implementing Game AI for Building Enemies

What is a game if not a great challenge to the player, who needs to use their character's abilities to tackle different scenarios? Each game imposes different kinds of obstacles on the Player, and the main one in our game is the enemies. Creating challenging and believable enemies can be complex; they need to behave like real characters and must be smart enough not to be easy to kill, but also easy enough that they are not impossible to kill either. We are going to use basic but good enough AI techniques to make an AI capable of sensing its surroundings and, based on that information, make decisions. These decisions will be executed using intelligent pathfinding.

In this chapter, we will cover the following topics:

  • Gathering information with sensors
  • Making decisions with FSM
  • Executing FSM actions

By the end of the chapter, you will have a fully functional enemy capable of detecting the player and...

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 €18.99/month. Cancel anytime