/ping-pong

The classic ping pong game made with Raylib/C++.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Ping Pong

🏓 The classic ping pong game made with Raylib/C++. 🏓

GitHub top language GitHub all releases GitHub last commit GitHub LICENSE

Features (v2.1.0)

  • A classic game with all the implementations you would expect.
  • Player versus Computer (simple AI algorithm).
  • Player versus Player (ws and arrows).
  • A ball that moves faster than your reflex.
  • A dead-simple score implementation.
  • It's written in C++, so it's blazingly fast!
  • It's very lightweight. It is consuming around 25MB of RAM!!

⬇️ Getting Started

How to install and run it

  1. Install the game executable in the releases section;
  2. Unzip it inside the folder and keep the files as they are;
  3. Double click the ping-pong.exe and enjoy the gameplay!

Feel free to open an issue. We'd like to read and fix the bugs you spotted!

How to play

Currently, it's pretty straightforward:

  • When you execute the game you are going to see the logo scene
    • press spacebar
  • Sequentially, you're gonna see the game mode selector
    • press w or arrow up to select Player versus CPU
    • press s or arrow down to select Player versus Player
    • then hit enter to proceed
  • In the gameplay scene you will see the ping pong court
    • press w or s to move the player one (left)
    • press arrow up or arrow down to move the player two (right), if they exist

You learned how to play Ping Pong! Hope you like it 💙

💖 Collaborators

See who helped to make this project better, CREDITS.

📑 Roadmap

A list to keep track of what's coming soon.

  • Release version 2.2.0.
    • Add background sound track.
    • Fix ball table collision sound.
    • Change ball color to contrast.
    • Implement winner (after 25 points).
  • Refactor #1.
    • Encapsulate global states.
    • Use header and implementation files (.cpp and .h).
    • Folder structure scene-based.
    • Enforces OOP.
  • Refactor #2.
    • Simplify scores and classes.
    • Use "state" design pattern to solve scene transition.

📝 License

This project is licensed under the GPL-3.0 License - See the LICENSE for more information.