Pong game help me

Hello,
I have to do a Pong for School but i didnt know how to do it, i’m absolut beginner.
Pls help me.
I’ve found some code for the game but they didnt have all i want.
And I want to understand what happen in the code so if u can explain and put codes thanks u.

You will need a ball and two paddles.

Each of these things will need a size and position.

Knowing just that much, you can write some code!

The code you can write is the variables for the sizes and positions of the paddles and ball.

You can also have the setup() and draw() functions.

You should call size() in setup().

You should call background() in draw().

Attempt to write even this small amount of code, and post it, for more help.

1 Like

i want the line code and can u explain what did u do. I’m a absolut beginner

Look at the examples for motion.

Can you draw an ellipse/ball? Make it red now. Now let it fly/move by adding something to its position. Now let it reflect on screen border…

maybe you can watch this

The Coding Train: Coding Challenge #67: Pong!

1 Like