2D Game Dev – Part 3.3: Mouse Input in Allegro 5

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.

Important, during the video I mention how to turn off the mouse cursor. In the video, the cursor is still visible. This is due to the recording software. I assure you it works.

Continuing our look at input in Allegro 5, it is time to talk about mouse inputs. You will find that mouse inputs (in my opinion) are easier to utilize than keyboard inputs. This makes sense, of course, if you consider how many more keys there are than mouse inputs.

This will conclude our look at inputs in Allegro 5. In Part 4 we will be looking more into the event system and learning how to make a good, consistent game loop.

Source code can be found here.

Notice that the source code is slightly different from the video? Here is why.

Posted in 2D Game Dev, Allegro, C++, Code, Game Dev, Part 3, Tutorial
4 Comments » for 2D Game Dev – Part 3.3: Mouse Input in Allegro 5
  1. Ryan says:

    Thank you for writing these tutorials. I recently downloaded Allegro 5, and these have been very helpful. This is the first Allegro 5 tutorial I have seen outside of the Allegro wiki, and, to be honest, yours is much better.

  2. sixtofive says:

    can u tutorial continue?
    i want to learn fast….

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>