Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2022:agmocanu:pong_game_with_lives [2022/05/27 20:24]
mihaela.stavarache
pm:prj2022:agmocanu:pong_game_with_lives [2022/05/27 21:59] (current)
mihaela.stavarache
Line 1: Line 1:
-====== Pong Game with Lives ====== +====== Pong Game with lives======
-===== Introducere ​=====+
  
 +===== 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.+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ă ===== ===== 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.+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. 
  
-{{:​pm:​prj2022:​agmocanu:​pong_game_lives.png?200|}}+{{:​pm:​prj2022:​agmocanu:​diagrama_pong_game.png?300|}}
  
 ===== Hardware Design ===== ===== Hardware Design =====
 +
 +{{:​pm:​prj2022:​agmocanu:​schema_electrica_pong_game.png?​300|}}
  
   * Arduino Uno   * Arduino Uno
Line 22: Line 24:
 ===== Software 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 ===== ===== Rezultate Obţinute =====
  
 +Start:
 +
 +{{ :​pm:​prj2022:​agmocanu:​pong_game1.jpeg?​300 |}}
 +
 +Play:
 +
 +{{ :​pm:​prj2022:​agmocanu:​pong_game2.jpeg?​300 |}}
 +
 +Score! Be the first that reaches 3 points!
 +
 +{{ :​pm:​prj2022:​agmocanu:​pong_game3.jpeg?​300 |}}
 +
 +Win!
 +
 +{{ :​pm:​prj2022:​agmocanu:​pong_game_4.jpeg?​300 |}}
  
 ===== Concluzii ===== ===== Concluzii =====
  
-===== Download =====+A real challenge! I am looking forward to trying to make more projects!
  
 +===== Download =====
  
-===== Jurnal =====+<​html><​a class="​code"​ href="​https://​github.com/​mihastv/​pong_game_arduino_project_MA2022">​download code</​a></​html>​
  
 +<​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​download PDF</​a></​html>​
  
 ===== Bibliografie/​Resurse ===== ===== Bibliografie/​Resurse =====
  
 +  - [[https://​docs.arduino.cc/​learn/​electronics/​lcd-displays]]
 +  - [[https://​www.youtube.com/​watch?​v=gpuzrMfoMGw&​ab_channel=AeroArduino]]
 +  - [[https://​www.nongnu.org/​avr-libc/​user-manual/​group__avr__interrupts.html]] ​
  
-<​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ 
  
pm/prj2022/agmocanu/pong_game_with_lives.1653672257.txt.gz · Last modified: 2022/05/27 20:24 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