Balls & Paddle game for RETRO Pong inspired game featuring multi-directional tilt-sensitive paddle, multiple balls, shrinking ceiling and a bit of gravity.

Dependencies:   LCD_ST7735 MusicEngine RETRO_BallsAndThings mbed

Balls and Paddle

After doing some work on the Pong mod I decided to put my efforts into making my version object oriented and try to make a generic object-library that could be use for other ball-and-things games. To add some challenges to the gameplay, the following features were added:

  • extra-free additional balls to please the juglers
  • gravity for pulling the ball down to create some dynamic movement
  • directional power-paddle that counters the ball with a bit more speed
  • lowering ceiling to make endless gameplay impossible
Revision:
1:bf46edcd6b4f
Parent:
0:7e989d0083ff
Child:
3:a68d4d515c20
--- a/Game.h	Fri Feb 06 10:18:41 2015 +0000
+++ b/Game.h	Mon Feb 09 08:34:32 2015 +0000
@@ -64,37 +64,30 @@
     bool lastDown;
     int nGameTickDelay;     // delay during game-tick
 
-    void printDouble(double value, int x, int y);
-    
     void initialize();
     
+    void printDouble(double value, int x, int y);
     void drawString(const char* str, int y);
+    void printf(int x, int y, const char *szFormat, ...);
+    int checkTiltLeftRight();
     
-
     void initializePaddle();
     void updatePaddle();
     void redrawPaddle();
-/*
-    void clearPaddle();
-    void drawPaddle();
-*/
-    //void initializeBall();
-    //void initializeBalls();
+    void checkPaddle();
+
     void setNoBalls();
     void newBall();
     void updateBalls();
     void redrawBalls();
     int countBalls();
+    void checkNumBalls();
     void checkBallsCollision();
+
     void redrawTopWall();
-    
-    int checkTilt();
     void checkButtons();
 
-    void checkPaddle();
     //void checkCollision();
-    void printf(int x, int y, const char *szFormat, ...);
-    void checkBalls();
     
     public:
         Game();