Skip to content

jonotassia/PongPlusPlus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PongPlusPlus - Pong with Powerups

PongPlusPlus is an in-progress experiment using C++ and SDL for game-design, inspired by the classic video game Pong.

Getting Started

In order to run this game, you will need to install the SDL and SDL-ttf library on your computer. Instructions for installation are listed below:

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
    • NOTE: If you are compiling on Windows and want make files, you can use the -G "Unix Makefiles" flag.
    • NOTE: If you are getting errors linking to SDL, you can run cmake with a pointer to the library as below: cmake .. -D CMAKE_PREFIX_PATH="C:\Users\jtass\vcpkg\packages" -G "Unix Makefiles"
  4. Run it: ./PongPlusPlus.

Features

Interface

In the below image, various game objects have been highlighted with colored boxes:

image

  • Red: The paddle zone. Paddles will move up and down along this boundary.
  • Yellow: The score board. Each side of the field has a score indicator for their respective players.
  • Pink: Ball start. This is the location where the ball will always start before being served.
  • Green: Current active powerup. Each player's powerup is displayed here by color. When used, the box becomes hollow.

Gameplay

Recommended Number of Players: 2

Gameplay Loop:

  • Each player takes control of a paddle.
  • The serve owner serves the ball at the opposing player - on bootup, this will always be player 1.
  • Players move vertically on their respective halves of the field to bounce the ball back and forth, speeding the ball up each time.
  • If the ball passes your paddle, the opposing player will be rewarded with a point. You will be awarded the next serve.
  • Play continues until either player reaches 10 points, at which point the game will be reset.

Powerups

Once per point, a user can attempt to catch the ball. Doing so successfully will award the user a game-altering powerup. But beware, missing a catch will reduce the size of the paddle by 10%, down to a minimum size of 30%.

Powerup Varieties:

  • Fire
    • Effect: Increases the ball speed by 2x immediately. Each subsequent hit will increase ball speed by 10%, rather than the usual 5%.
    • Duration: 10 Hits
Fire.Ball.mp4
  • Ice
    • Effect: Each time a paddle is contacted by the ice ball, its speed decreases by 20%.
    • Duration: 10 Hits
Ice.Ball.mp4
  • Sun
    • Effect: Both players are blinded. The color contrast between the ball and the background become more difficult to distinguish.
    • Duration: 5 Hits
Sun.Ball.mp4
  • Shadow
    • Effect: Shadows erupt around the opposing player's side, rendering them unable to see their paddle.
    • Duration: 3 Hits
Shadow.Ball.mp4
  • Confusion
    • Effect: The ball begins to move in wave patterns and behaves in unexpected ways when objects are contacted.
    • Duration: 5 Hits
Confuse.Ball.mp4

Controls

Player 1:

  • Move Paddle Up: W
  • Move Paddle Down: S
  • Catch Ball: D
  • Serve Ball: Space

Player 2:

  • Move Paddle Up: Arrow-Up
  • Move Paddle Down: Arrow-Down
  • Catch Ball: Right-CTRL
  • Serve Ball: Return (Enter) or Numpad-Enter

Roadmap

  • More Powerups:
    • Root ball
    • Shrink ball
    • Energy ball
    • LOVE ball
  • Computer-controlled Player 2
  • Menus, including power-up selection
  • Stat-tracking

About

Pong with powerups

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published