Original Post
Hi, I have a simple question, probably super easy too, so I'd appreciate if someone could help me out here!
I'm trying to recreate Pong, but far from that...I'm at the stage of getting things on the screen
Basically, I want to move the rectangles on the sides, but can't figure out how in a productive manner.
And before I get any farther, I am running Allegro 4.2, not the new version, 5.
I have this code:
Sorry if it looks weird, trying to figure out how to put code on here...anyways...Basically for anyone who has ran Allegro, this simply redraws another rectangle, so it ends up looking like there's a rectangle on the whole left side. I've tried doing
Any help would be appreciated, or point me in the right direction!
Thank you,
MrMonkeh
I'm trying to recreate Pong, but far from that...I'm at the stage of getting things on the screen
Basically, I want to move the rectangles on the sides, but can't figure out how in a productive manner.
And before I get any farther, I am running Allegro 4.2, not the new version, 5.
I have this code:
if (key[KEY_S])
{
y1++;
rest(10);
y2++;
rest(10);
rectfill(screen,x1,y1,x2,y2,15);
}Sorry if it looks weird, trying to figure out how to put code on here...anyways...Basically for anyone who has ran Allegro, this simply redraws another rectangle, so it ends up looking like there's a rectangle on the whole left side. I've tried doing
rectfill(screen,x1,y1,x2,y2,0); to sort of "erase" it, but then when moving it just looks horrible (flicking black).Any help would be appreciated, or point me in the right direction!
Thank you,
MrMonkeh