Project realized for the Pisa CoderDojo, implementing a finite-state machine for a simple enemy model. idle : player in sight -> chase chase: player in range -> attack chase: player out of sight -> idle attack: player out of range -> idle attack: player in sight -> chase Use the arrow keys to move the player ship and interact with the enemy
Finite-state machines are simple, rule-based systems in which a finite number of "states" are connected in a directed graph by "transitions" between states. The finite-state machine occupies exactly one state at any moment. Free to use game assets by Kenney game studio. https://www.kenney.nl/