Book Image

Source SDK Game Development Essentials

By : Brett Joseph Bernier
Book Image

Source SDK Game Development Essentials

By: Brett Joseph Bernier

Overview of this book

Table of Contents (18 chapters)
Source SDK Game Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using nodes


The AI (Artificial Intelligence) is clever, but it frequently needs some coercing to really do what we want it to do. That's where the nodes come into play. Nodes come in many varieties, but we'll be focusing on two nodes in this chapter: info nodes define the basic nav-mesh that the NPCs use to get around and hint nodes give additional meaning to the nav-mesh and help with NPC battles.

Using info nodes

Info nodes, when placed, are short yellow boxes and have Ground Node written on them, as shown in the following image:

The info_node entity is the most basic piece that makes up the navigation mesh, but they have a significant impact on how the AI works. To really see how necessary these are, let's start by making a simple map where we can see the difference between having them and not having them. Make a 1024 x 1024 room, place some combine soldiers in it, give yourself a gun, and place some boxes for cover. I have included an example map, that is, ch10_example01 that you can refer...