Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Beginner's Guide to Game Programming Ep1 Part 3-A Keyboard Input in Allegro 4

Loading...

Sign in or sign up now!
11,745
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 22, 2009

The Beginner's Guide to Game Programming:
A Problem Solving Approach
Episode 1: Makin' Pickin' Sticks
Part 3-A: Keyboard Input with Allegro

This is a written and video tutorial created to teach the basics of Allegro and SDL as well as game programming in general, while encouraging the newbie to code it out themselves.

This video talks about the functions for getting keyboard input, and a few other notes.

You can get the written version and other things at my site:
http://www.moosader.com

Playlist link:
http://www.youtube.com/view_play_list?p=B9C8BC6F495BD17E

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (LusikkaMage)

  • Is there something that you can do to say for example fire when I release the ctrl key?

  • @cplusplusgamer Yeah, there should be a "key up" like there is a "key down". "Key press" is like key down but I believe only triggers it once, whereas key-down will keep repeating the event over and over.

  • ok so,

    if (key[KEY_UP]) player.Move(UP);

    this means that if the up arrow is pressed (KEY_UP) the person will just move twards the top of the screen right?

    and these are functions on their own right?

  • @MrHankkey93 player.Move is a function that you will have to write.

  • will this this work in other compliers than allegro

  • @stanmarshk Allegro is not a compiler, it is a library. Allegro handles graphics, sound, input, and other things. This tutorial covers both Allegro and SDL librarys, so check 3-B if you want to use SDL instead.

    As far as IDEs go (Integrated Dev Environments, usually mistaken with Compilers), you can compile your program in any C++ IDE or compiler, you just have to know how to set up the library for it.

see all

All Comments (24)

Sign In or Sign Up now to post a comment!
  • Oh, the playlist one is correct, the one in the links is wrong. Sorreh

  • Oh sorry. I'll fix that. That was because the original video had an error that absolutely needed fixing so that one is private, the fixed one is public and I forgot to add it to the list. D:

  • "E1V3B: Keyboard input with SDL" is market private? T.T

    or is it just youtube having an error?

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more