Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (24)

Sign In or Sign Up now to post a comment!
  • Comment removed

  • 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.

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

    or is it just youtube having an error?

  • 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:

  • Oh, the playlist one is correct, the one in the links is wrong. Sorreh

  • can i use allegro and sdl in the same project?

  • There really isn't any reason to do so. If you want SDL's more advanced functionality, then just use SDL and forget about Allegro. They both take care of the same basic stuff.

    Using Allegro or SDL with OpenGL does make sense, though, since OpenGL only handles graphics.

  • I prefer allegro, for now, is apparently easy to use, yet ... I just want to make and make games, and I would like to make the most of this....Sorry about my English, I'm learning now

  • np.

    I learned Allegro to begin with. Once you learn and get comfortable with one, it's pretty easy learning the other. A lot of it is a matter of going "okay, instead of masked_blit, I'll use SDL_BlitSurface"

  • Lol, thanks for your advice, I'll do my best, I forgot to ask you, where you will study computer science? bye

  • This past December I got my Bachelors in Science of Computer Science from the University of Missouri, Kansas City.

    o.o

  • O.O.....LOL, what you gonna do now? sorry for asking you too much

  • Eheh. Work on portfolio 'n' tutorials, and apply for jobs. :o

  • ok bye, have a nice night

  • i want to use the class idea to keep organized but i really dont no what to do??

  • If you don't already have one already, maybe find yourself a C++ textbook, or one of those "learn C++" books.

  • Can You Help Me?

    I Keep Getting `key' undeclared (first use this function)

  • It is saying that any other allegro functions are undefined?

    If not, make sure your input stuff looks like:

    if ( key[KEY_UP] ) { ... }

  • I'm kind of confused. Would I have to make a different class for the movements? Also withe the next allegro video would I have to make another class for the Graphics input?

  • I would have something like this:

    enum Dir { UP, DOWN, LEFT, RIGHT };

    class Player

    {

    private: int x, y, speed;

    public: void Move( Dir dir );

    };

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