Table of Contents

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

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

download code

download PDF

Bibliografie/Resurse