Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Make A Classic Pong Game, Javascript & P5.js Framework
Rating: 4.3 out of 5(29 ratings)
101 students

Make A Classic Pong Game, Javascript & P5.js Framework

Learn Javascript By Making Games
Created bySaran Siri
Last updated 3/2019
English

What you'll learn

  • Be able to declare and assign variables in JavaScript
  • Be able to use conditional statement and coordinate system in JavaScript
  • Be able to understand the foundation of 2D game including the setup and draw cycle
  • Be able to apply new idea to the existing game

Course content

1 section12 lectures45m total length
  • Introduction0:45

    Introduction to the course, what we cover in this course

  • P5.js Basics3:22

    Basic functions in P5 framework

  • Coordinate System1:22

    How 2D coordinate system works in P5 framework

  • Draw The Line2:54

    Draw a line / dashed line for the net in the game

  • Draw The Paddle4:07

    Draw player's paddle at the left side, and talk about how pivot works in rect function

  • Move The Paddle4:36

    Move player's paddle using keyboard keys, and how to limit the travel distance of the paddle

  • Ball's Collision8:03

    Introduce ball into the game, and make it bounce around 4 walls

  • Paddle's Collision6:59

    Make the ball bounce against player's paddle with different angle and speed

  • Computer AI6:14

    Create a simple opponent, and make it move towards the ball

  • Score System4:02

    Add the score system to track player's and computer's scores

  • Freeze The Ball1:36

    Freeze the ball when every time the game ends

  • Share Your Project1:43

    Share your project with 4 different types of links

Requirements

  • Basic knowledge of Javascript or coding in general
  • Basic knowledge of web browser

Description

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.

Who this course is for:

  • Anyone who wants to learn coding
  • Anyone who loves games and wants to make games