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
This video serves as an introduction into game states and how they are implemented. Using states we can create a structure for our game. Check it out!
Full source can be found here.
Why is it that when i used if(keys[ENTER]) state = PLAYING; it exits the program? but when i used SPACE its ok