The next thing we want to draw is the ball and the paddles. Follow the ensuing steps:
DrawCircle
command and some DrawRect
commands to the OnRender
method.Method OnRender:Int() Cls 'Clear the canvas each frame DrawPlayField() 'Draw the play field DrawRect(pX, pY-30, 5, 60) 'Draw the player paddle DrawRect(eX[0], eY[0]-30, 5, 60) 'Draw the enemy paddle #1 DrawRect(eX[1], eY[1]-30, 5, 60) 'Draw the enemy paddle #2 DrawCircle(bX, bY, 5) 'Draw the ball with a radius of 5 Return True
Pongo_04.Monkey
. Does your game look like this now?The next thing we will add is the movement of the paddles and the ball.