Pong Game with lives

Introducere

A game in which the player has to hit the ball as many times as possible and gain as many points as possible to win against the other opponent.

Descriere generală

The game starts by pressing any of the push buttons. The buttons are used for moving the paddle that hits the ball and changes its trajectory. Each of the two players has two buttons for moving up and down. The first player to reach 3 points wins. The current score and winner are displayed on the LCD.

Hardware Design

  • Arduino Uno
  • LCD 16×02
  • breadboard
  • push button x4
  • wires
  • resistors x4 (R=1kΩ)

Software Design

I have used the libraries: LiquidCrystal.h and avr/interrupt.h, specific for LCDs and interruptions. The game works with two objects of the class Paddle, which are the tools for hitting the ball, an object of the class Ball, which controls the coordinates and movement of the ball in different expected situations and positions where it could land, an object of the class Print Game, which allows us to display messages for beginning the game, who the winner is, the score, and the game itself. The game stops and declares the winner when one of the players reaches 3 points.

Rezultate Obţinute

Start:

Play:

Score! Be the first that reaches 3 points!

Win!

Concluzii

A real challenge! I am looking forward to trying to make more projects!

Download

Bibliografie/Resurse

pm/prj2022/agmocanu/pong_game_with_lives.txt · Last modified: 2022/05/27 21:59 by mihaela.stavarache
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0