@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.
@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.
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:
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
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"
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?
Comment removed
DemangoProductions 5 months ago
Is there something that you can do to say for example fire when I release the ctrl key?
cplusplusgamer 6 months ago in playlist Beginner's/Game Programming 1
@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.
LusikkaMage 6 months ago
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 9 months ago
@MrHankkey93 player.Move is a function that you will have to write.
LusikkaMage 9 months ago
will this this work in other compliers than allegro
stanmarshk 1 year ago
@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.
LusikkaMage 1 year ago
"E1V3B: Keyboard input with SDL" is market private? T.T
or is it just youtube having an error?
TreyRust 1 year ago
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:
LusikkaMage 1 year ago
Oh, the playlist one is correct, the one in the links is wrong. Sorreh
LusikkaMage 1 year ago
can i use allegro and sdl in the same project?
Nitros8891 2 years ago
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.
LusikkaMage 2 years ago
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
Nitros8891 2 years ago
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"
LusikkaMage 2 years ago
Lol, thanks for your advice, I'll do my best, I forgot to ask you, where you will study computer science? bye
Nitros8891 2 years ago
This past December I got my Bachelors in Science of Computer Science from the University of Missouri, Kansas City.
o.o
LusikkaMage 2 years ago
O.O.....LOL, what you gonna do now? sorry for asking you too much
Nitros8891 2 years ago
Eheh. Work on portfolio 'n' tutorials, and apply for jobs. :o
LusikkaMage 2 years ago
ok bye, have a nice night
Nitros8891 2 years ago
i want to use the class idea to keep organized but i really dont no what to do??
McClover 2 years ago
If you don't already have one already, maybe find yourself a C++ textbook, or one of those "learn C++" books.
LusikkaMage 2 years ago
Can You Help Me?
I Keep Getting `key' undeclared (first use this function)
carnage95kid 2 years ago
It is saying that any other allegro functions are undefined?
If not, make sure your input stuff looks like:
if ( key[KEY_UP] ) { ... }
LusikkaMage 2 years ago
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?
BigCDaddy3 2 years ago
I would have something like this:
enum Dir { UP, DOWN, LEFT, RIGHT };
class Player
{
private: int x, y, speed;
public: void Move( Dir dir );
};
LusikkaMage 2 years ago