- Unity 2017 Game AI Programming(Third Edition)
- Ray Barrera Aung Sithu Kyaw Thet Naing Swe
- 209字
- 2021-07-02 19:14:13
Finite State Machines and You
In this chapter, we'll expand our knowledge of the FSM pattern and its uses in games and learn how to implement it in a simple Unity game. We will create a tank game with the sample code that comes with this book. We'll be dissecting the code and the components in this project. The topics we'll cover are as follows:
- Understanding Unity's state machine features
- Creating our own states and transitions
- Creating a sample scene using examples
Unity 5 introduced state machine behaviors, which are a generic expansion of the Mecanim animation states that were introduced in the 4.x cycle. These new state machine behaviors, however, are independent of the animation system, and we will learn to leverage these new features to quickly implement a state-based AI system.
In our game, the player will be able to control a tank. The enemy tanks will be moving around in the scene with reference to four waypoints. Once the player tank enters their visible range, they will start chasing us, and once they are close enough to attack, they'll start shooting at our tank agent. This simple example will be a fun way to get our feet wet in the world of AI and state FSMs.
- Google Apps Script for Beginners
- AutoCAD VBA參數化繪圖程序開發與實戰編碼
- INSTANT Django 1.5 Application Development Starter
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(1)
- Python+Tableau數據可視化之美
- Scratch·愛編程的藝術家
- Mastering Docker
- Kotlin進階實戰
- Raspberry Pi開發實戰
- 計算機視覺實戰:基于TensorFlow 2
- Testing Practitioner Handbook
- Java項目驅動開發教程
- Instant JRebel
- Learning WebRTC
- Java 開發從入門到精通