Recommended Posts

so I have this code which is based on one of the projects in the Tricks windows book, which could draw random rectangles to the screen, so I decided to try and see if i could put together a little pong. so first a changed the code to draw 3 boxes: a player, a computer(I’m treating this as a one player game right now, I’m not really worrying about the other paddle yet), and a "ball." next i wanted to make the player paddle move, so i put together some input code, which sees if the up or down key has been pressed, and if so changes the coordinates of the paddle, but when I run the program the paddle responds very poorly, it jumps to the top of the screen and barley moves form there. Here’s the main game code: