This post is a portion of Part 3 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.
- Part 3.0: Player Input and Events
- Part 3.1: Keyboard Input Part 1
- Part 3.2: Keyboard Input Part 2
- Part 3.3: Mouse Inputs in Allegro 5
In this video we will continue our look at keyboard input in Allegro 5. In the previous video, we did not have a way to track “holding” a button for continuous movement. You will see that using an enumeration and an array of boolean values that more in depth input it easy.
Source code can be found here.
Notice that the source code is slightly different from the video? Here is why.