
Introduction to the course, what we cover in this course
Basic functions in P5 framework
How 2D coordinate system works in P5 framework
Draw a line / dashed line for the net in the game
Draw player's paddle at the left side, and talk about how pivot works in rect function
Move player's paddle using keyboard keys, and how to limit the travel distance of the paddle
Introduce ball into the game, and make it bounce around 4 walls
Make the ball bounce against player's paddle with different angle and speed
Create a simple opponent, and make it move towards the ball
Add the score system to track player's and computer's scores
Freeze the ball when every time the game ends
Share your project with 4 different types of links
Let's make a classic Pong game using free online P5js editor
Hello, my name is Saran. In this class, I will show you how to make a simple, easy to follow, classic Pong game using Javascript and P5js framework.
In the class, we will
draw lines
add paddle
make the paddle move using keyboard
make a bouncing ball
add the computer
add the score system.
If you are ready, let’s open the next lesson, and get started.