This post is a portion of Part 13 in my on going series about 2D Game Development using the Allegro 5 library. These posts are in course order. You can see all of the posts in this course by clicking the “2D Game Development” button at the top of this site.
- 13.0 – Game States
- 13.1 – Implementing Game States
- 13.2 – Better Game State Implementation
- 13.3 – Finite State Machine Artificial Intelligence
In this video we focus on improving out game state system. Using a method ‘ChangeState()’ we are able to add robustness. The video covers the use of pre and post state change commands. That is to say, we can execute code when we leave a state and when we enter a state to help improve the overall flow of our games.
Full source can be found here.