Welcome to the Game Package repository! This project contains a collection of games developed using the Raylib library in C++. The first game included is Ping Pong, and more games will be added in the future.
This project is a game package developed using the Raylib library in C++. Raylib is a simple and easy-to-use library to enjoy videogames programming. It allows you to create visually appealing games with minimal effort.
A classic Ping Pong game where two players control paddles to hit the ball back and forth. The game continues until one player scores the winning point.
Future games will be added to this package, enhancing the variety and fun.
To run the games in this repository, you need to have Raylib installed on your system. Follow the steps below to set up your environment:
-
Install Dependencies:
Ensure you have installed all necessary dependencies for your platform. For detailed instructions, refer to the Raylib documentation.
-
Update System Environment Variables:
Add the following path to your system environment variables:
C:\raylib\w64devkit\bin
-
Navigate to Source Directory:
Open a terminal and navigate to the following path:
C:\raylib\raylib\src
-
Compile Raylib:
In the terminal, run the following command:
mingw32-make PLATFORM=PLATFORM_DESKTOP
-
Locate Compiled Library:
After the command executes successfully, a new file named
libraylib.a
will be created. -
Replace Existing Library:
Copy the newly created libraylib.a file and replace the existing
libraylib.a
file in the lib folder within your project directory. -
Create Makefile:
Create a Makefile in your project directory and add the following content:
# Define the source files for the project SOURCES = ./src/main.cpp # Default target to compile the project default: g++ $(SOURCES) -o ./build/game.exe -g -O1 -Wall -Wno-missing-braces -I include/ -L lib/ -lraylib -lopengl32 -lgdi32 -lwinmm # Run the compiled executable ./build/game.exe
-
Run the Program:
To compile and run the program, execute the following command in the terminal:
make
After building the project, you can run the game using the command mentioned above. Use the following controls to play Ping Pong:
- Player Controls:
W
- Move paddle upS
- Move paddle down
Contributions are welcome! If you have ideas for new games or improvements to the existing ones, please feel free to fork this repository, make your changes, and submit a pull request. Here are the steps to contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.