November 2018
Beginner
246 pages
5h 23m
English
In Chapter 2, Finite State Machines, we saw how to implement a simple FSM. In this section, we are using the same technique, but will apply it to the more complex scenario of this demo.
First of all, we need an FSM plan. For this demo, we are interested only in how to connect the FSM to the existing game, so we will keep it simple. The FSM for our tank is composed of just two states, patrolling and shooting.
The plan is nice and simple:
Read now
Unlock full access