The classic Pong is the first on the list of "The 20  Games Challenge" I achieved the main objectives on the first day, which I consider a success because I'm not generally known for developing at a high speed. Likewise, it wasn't a smooth progress all the way. The initial attempt with Area2D walls not only became cumbersome but was the wrong path from the beginning. Ultimately, it was much easier to use a clamp for the player's position and something similar for the ball.  In a second session, I completed the extended objectives. 

Taking on the challenge is definitely a good decision; I just hope I can sustain it long enough and not abandon it prematurely.

Try The 20 Games Challenge!

Pong  (1972) Wiki


Controls:

  Player One: "W", "S" 

  Player Two: "Up" Arrow , "Down"  Arrow

  "Escape" for in game pause menu

 * the "main" and "pause" menus are mouse only


Goals:

  • Create an arena with two walls and a divider.
  • Add a paddle on either end of the play field. Use player inputs to move the paddles up and down.
  • Add a ball that moves around the playfield and bounces off of the paddles and walls.
  • Detect when the ball leaves the playfield. Assign a point to the player who scored.
  • Track and display the score for each player.


Stretch goals:

  • Write an AI script that can follow the ball so you can play with only one player.
    Hint: Following the ball with a paddle is easy, but it makes the opponent impossible to beat. You might want to make the AI less than perfect somehow.
  • Add a menu and allow the player to reset the game.
  • Add some basic sounds. Play a sound every time the ball collides with something, and every time a player scores.


I used this image as a reference:



unfinished:

The collision detection between the ball and the paddles occasionally fails in certain combinations of angles and speeds.

I gave 'One way collision' and 'One way collision margin' a shot, and it seems to improve things in most cases, but not always though.


fonts by Nimble Beasts Collective


Leave a comment

Log in with itch.io to leave a comment.