Skip to content
MAS-W-415Public

About

A small C++17/raylib Pong demo

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Pingpong

English | 简体中文

A small two-player Pong demo built with C++17 and raylib.

Overview

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.

Controls

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

Requirements

  • A C++17 compiler (GCC or Clang; the Makefile force-includes the local raylib.h overlay)
  • make
  • raylib 5.5 development files with pkg-config metadata
  • A graphical display

Build and run

make
make run

make builds ./pingpong; make clean removes it. Verify the raylib version with:

pkg-config --modversion raylib

Run the game from the repository root so the relative paths under sounds/ resolve correctly.

Project structure

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

License

MIT

About

A small C++17/raylib Pong demo

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages