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
Procedural Content Generation for Unity Game Development

You're reading from   Procedural Content Generation for Unity Game Development Harness the power of procedural content generation to design unique games with Unity

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781785287473
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ryan Watkins Ryan Watkins
Author Profile Icon Ryan Watkins
Ryan Watkins
Arrow right icon
View More author details
Toc

AI


Artificial intelligence, like physics and animation, is also its own field of study. We can use PCG to enhance certain aspects of AI. In Chapter 7, Adaptive Difficulty, we used PCG to rewrite a section of our AI. This isn't always the most practical approach though.

AI for games can be easily visualized as a state machine or a graph of connected behaviors. Some actions in the AI graph might lead to others or some situations might cause an AI to enact a certain behavior. In the following diagram, we see rectangles represented as states and arrows representing states transitioning into other states. This network of states can be as complex or simple as we like.

AI state machine

An example of a complex AI state machine is Bethesda's Radiant AI. This AI system has the NPCs react to the actions of the player, but also has them generate a daily routine. They can go to work, travel, and some might set out to attempt assassinations. These behaviors are programmed separately, but then the routine...

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