© Sloan Kelly  2019
Sloan KellyPython, PyGame, and Raspberry Pi Game Developmenthttps://doi.org/10.1007/978-1-4842-4533-0_19

19. Finite State Machines

Sloan Kelly1 
(1)
Niagara Falls, ON, Canada
 

A state can be described as a condition of a program or entity. Finite defines that there is only a set number of states that the program or entity can be defined by. The entity is controlled by a series of rules that determine what the next state of the program or entity is to be placed in.

Finite State Machines are used in video games for Artificial Intelligence (AI) as well as menu systems and the overall game state as well.

Game State

A game is a computer program that has unique, discrete, compartmentalized states, for example, splash screen, playing the ...

Get Python, PyGame, and Raspberry Pi Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.