This is an old revision of the document!


Pong Game with Lives

Introducere

A game in which the player has to catch the ball as many times as possible, but loses one life out of three in total every time the ball falls.

Descriere generală

The game starts by pressing the start push button. The joystick is used for moving the line that catches the ball. The player starts with three lives and the green color on the LED. Each time he loses one life the color changes (yellow means 2 lives left, red means one life left). The game is displayed on the LCD as well as the score at the end of a round.

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

Concluzii

Download

Jurnal

Bibliografie/Resurse

pm/prj2022/agmocanu/pong_game_with_lives.1653673405.txt.gz · Last modified: 2022/05/27 20:43 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