Giter Club home page Giter Club logo

pongwithgravity's Introduction

Pong with Gravity

This project is a simple Pong game with added gravity, developed using SDL2. The game includes a paddle and a ball that moves under the influence of gravity, and the player controls the paddle to keep the ball in play.

Table of Contents

Features

  • Basic Pong gameplay with gravity.
  • Control the paddle to keep the ball in play.
  • Simple and clean code structure for easy understanding and modification.

Requirements

  • SDL2 library
  • CMake
  • GCC or any other C compiler

Installation

SDL2 Installation

On Ubuntu:

sudo apt-get update
sudo apt-get install libsdl2-dev

On macOS (using Homebrew):

brew install sdl2

Project Setup

  1. Clone the repository:
git clone https://github.com/felixBtzr/PongWithGravity.git
cd PongWithGravity
  1. Create a build directory and run CMake:
mkdir build
cd build
cmake ..
make

Usage

After building the project, you can run the game using the following command in the build directory:

./PongWithGravity

Controls

  • A or Left Arrow: Move paddle left
  • D or Right Arrow: Move paddle right

Project Structure

gravity-pong/
├── assets/
│   ├── fonts/
│   │     └── PressStart2P-Regular.ttf
│   ├── sounds/
│   └── textures/
├── include/
│   ├── config.h
│   ├── game.h
│   ├── graphics.h
│   └── input.h
├── src/
│   ├── config.c
│   ├── main.c
│   ├── game.c
│   ├── graphics.c
│   └── input.c
├── CMakeLists.txt
├── LICENSE.md
└── README.md
  • include/: Contains the header files for the game.
  • src/: Contains the source files for the game logic, graphics, and input handling.
  • assets/: Directory for game assets like fonts, sounds, and textures.
  • CMakeLists.txt: The CMake configuration file.
  • LICENSE.md: License file.
  • README.md: This file.

Contributing

Contributions are welcome! If you have any improvements or suggestions, feel free to fork the repository and create a pull request.

  1. Fork the repository.
  2. Create your feature branch: git checkout -b feature/my-feature.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/my-feature.
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • SDL2 for providing a powerful and easy-to-use library for multimedia and game development.
  • CodeMan38 for designing this awesome font!

pongwithgravity's People

Contributors

felixbtzr avatar

Stargazers

Hendrik Ziegler avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.