Skip to content

zerfithel/pongc

Repository files navigation

PongC

PongC is a multithreaded implementation of a retro-game „Pong” in pure C, it uses GPU-accelerated rendering using OpenGL and implements a P2P two-player mode.

Features

demo

  • Multithreaded (network & game-logic thread)
  • P2P architecture
  • GPU-Acceleration in OpenGL
  • Low-level optimizations (thanks to being written in C)
  • Hackable shaders and game settings

Install from package

You can find pre-compiled binaries for both Windows and Linux in releases page.

Install from source

Dependencies:

  • git *
  • cmake *
  • make *
  • C23+ compiler *
  • SDL2
  • OpenGL 3.3+
  • libenet

*make depends

The build is CMake-based. After installing the dependencies run the following commands.

git clone https://github.com/zerfithel/pongc && cd pongc
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release # Build for release
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug   # Build for debugging

cmake --build build --parallel $(nproc)
build/pongc

Warning

On Windows, you might need to specify build system with -G flag. For example: -G MingW Makefiles

Note

You can use make release or make debug to skip long cmake commands

In order to install PongC run following command if you are using Linux or Unix/Unix-like system:

chmod +x scripts/install.sh && scripts/install.sh

If you are using Windows, please run instead:

.\scripts\install.bat

Project layout

├── CMakeLists.txt  CMake build file
├── demo.gif        Game demo GIF
├── LICENSE.txt     Project LICENSE
├── README.md       This file
├── ARCHITECTURE.md Project architecture
├── CONTRIBUTING.md Contributing file
├── ROADMAP.md      Project feature roadmap
├── Makefile        File to format code
├── scripts/        Associated to project scripts
└── src/            PongC source code

Contributors ❤️

Contributors

License

PongC is available under MIT License

About

Multithreaded Pong with Peer-to-Peer two-player mode and GPU-accelerated rendering using OpenGL all in pure C

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors