View Single Post
Old 11-12-2008, 10:02 PM   #38

Activity Longevity
0/20 18/20
Today Posts
0/11 sssssss84
Location: Tuckahoe, NY

Originally Posted by Claxon View Post
Yes that's right. I tend to keep my game loop fairly simple, it will call two functions, the first called Process() (or Update()) that handles the movement / AI / Game States etc, and another function called Paint() that deals exclusively with drawing the game (you don't want to do processing update within your draw loop). In this system the Draw function would simple get the position of the paddles and the ball, and draw them at that location. The process loop would update the position and speed values, and check for collision.
I am having difficulty drawing the paddles when the user moves them using the keyboard. I am updating the x or y coordinates for each move and passing it to the BitBlt() function for bitmaps, but it does not seem to draw anymore once I get my initial draw on there. I am not sure exactly what I am doing wrong but I've been trying all ways to get this done. I am just showing my n00bie colors lol.
Mike M
Facebook Profile LinkedIn Profile
Duckman is offline