🏓 Pong

Do Now

In p5, make a rectangle that follows your mouse.

Like this:

I think you can see where this is going...

🏓 Pong

We’re going to build a version of pong, one of the first computer games.


pong ✱ Pretend you’re talking to the ball. How should it move?
✱ What about the paddles. How should they move?

Pseudocode with variables

✱ Redo your pseudocode, using x, y, windowWidth, and windowHeight.
✱ How did writing pseudocode change how your wrote p5 code?

🎯 Learning Targets
I can write the pseudcode for pong.
I can use built-in variables to make a paddle follow my mouse.
I can write p5 comments to explain my iteration and thinking.

Next time…