CHAPTER 6

image

Game object states and Semiautonomous Behaviors

After completing this chapter, you will be able to:

  • Understand the uses of a finite state machine and how to implement one
  • Create your own dynamic behaviors via a state machine
  • Understand how to work with large groups of game objects within your game

So far, the behaviors you have added to game objects have been fairly straightforward, consisting mostly of a single state. Therefore, the game objects’ behaviors have not been malleable to conditions that would modify their initial behaviors. In this chapter, we will show you how to create more complex and dynamic behaviors for your game ...

Get Learn 2D Game Development with C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.