Go to file
2024-01-30 19:17:11 +01:00
images Images 2024-01-29 21:54:29 +01:00
src nullptr error handling 2024-01-30 19:17:11 +01:00
.gitignore gitignore 2024-01-29 16:28:14 +01:00
bin-to-array.py Embedded window icon (cross platform) 2024-01-29 15:21:13 +01:00
CMakeLists.txt Let user select max score at start 2024-01-29 19:06:02 +01:00
icon.bmp Embedded window icon (cross platform) 2024-01-29 15:21:13 +01:00
LICENSE BSD-2-Clause 2024-01-29 19:18:38 +01:00
README.md Images 2024-01-29 21:54:29 +01:00

Pong

A pong implementation in C++.

Welcome different-max-score
count-down play1
play2 finish

Dependencies

You'll need cmake make, sdl2 sdl2-gfx and sdl2-ttf to compile. Under debian-based systems that can be installed using the following command.

apt install cmake build-essential libsdl2-dev libsdl2-gfx-dev libsdl2-ttf-dev

DejaVuSans is also expected to be present at the default location under linux whilst Arial is under Windows and macOS. The package under debian is called fonts-dejavu-core

Compiling

To compile simply use the following.

cmake -B build
make -C build

If you'd like to enable optimizations you may pass -DENABLE_OPTIMIZATIONS=ON to cmake. You'll end up with the following then.

cmake -DENABLE_OPTIMIZATIONS=ON -B build 
make -C build

You'll end up with the following command cmake -DENABLE_OPTIMIZATIONS=ON.