English | 简体中文
A small two-player Pong demo built with C++17 and raylib.
Pingpong includes two paddles, a bouncing ball, boundary collisions, collision sound effects, pause support, and a start screen. A round ends when the ball crosses the left or right boundary.
| Input | Action |
|---|---|
W / S |
Move left paddle up / down |
Up / Down |
Move right paddle up / down |
Space |
Start the game from the start screen; pause / resume during a round |
Esc / close window |
Quit from the start screen |
- A C++17 compiler (GCC or Clang; the Makefile force-includes the local
raylib.hoverlay) make- raylib 5.5 development files with
pkg-configmetadata - A graphical display
make
make runmake builds ./pingpong; make clean removes it. Verify the raylib version with:
pkg-config --modversion raylibRun the game from the repository root so the relative paths under sounds/ resolve correctly.
main.cpp Entrypoint and window loop
game.cpp / game.h Game state, input, collisions, rendering
components/ Game entities, collision, input, and sound helpers
sounds/ WAV sound effects
raylib.h Local raylib overlay header
Makefile Build and run targets
MIT