Originally Posted by
algorism
420 is a good number. A very good number. I'm all for that.
However, to move horizontally you will want to modify the x coordinate. Try copying the vertical code and changing the y's to x's (and change the keys as well). And you may not want the high value to be 420. If the paddle is allowed to travel anywhere in the window then you would use the horizontal window size, which is presumably different from the vertical size. But you may want to limit it to something less than that.
The above is for the left-hand paddle. For the right-side paddle you'll want to use the vertical size instead of 0, and 0 (or whatever you want to limit it to) for the other value.
Ok thank you, i managed to do it, but i need to buffer because, the "bat" is sticking to the screen while i move.
Code:
acquire_screen();
rectfill( buffer, p1_tempX, p1_tempY, p1_tempX + 10, p1_tempY + 60, makecol ( 0, 0, 0));
rectfill( buffer, p1_x, p1_y, p1_x + 10, p1_y + 60, makecol ( 0, 0, 255));
release_screen();