https://github.com/whoiscipher/minigolf
2D mini golf game developed in C++ using raylib
https://github.com/whoiscipher/minigolf
cpp game-development raylib raylib-cpp
Last synced: 12 months ago
JSON representation
2D mini golf game developed in C++ using raylib
- Host: GitHub
- URL: https://github.com/whoiscipher/minigolf
- Owner: WhoisCipher
- License: mit
- Created: 2024-08-07T01:31:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-10T16:51:44.000Z (about 1 year ago)
- Last Synced: 2025-03-10T17:47:15.128Z (about 1 year ago)
- Topics: cpp, game-development, raylib, raylib-cpp
- Language: C++
- Homepage:
- Size: 1000 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MiniGolf

A simple 2D mini-golf game developed using Raylib and C in CMake. The player aims to pot the ball into the hole while navigating obstacles.
## Description
MiniGolf is a casual 2D golf game written in C using the Raylib library. The game simulates a mini-golf course where the player clicks to aim and hit the ball toward the hole. The game includes obstacles and friction for realistic gameplay.
- **Gameplay**:
- Left-click to hit the ball towards the hole.
- The ball moves with friction, slowing down over time.
- The game ends when the ball is potted into the hole.
## Features
- **Ball Physics**: Realistic movement of the ball with friction.
- **Obstacles**: Rectangular obstacles that block the ball’s path.
- **Simple Mechanics**: Hit the ball using mouse clicks and try to pot it into the hole.
## Game Controls
- **Left-click**: Hit the ball in the direction of the mouse position.
- **No Menu**: The game starts immediately when you run it.
## CMake Setup
The project uses **CMake** to generate build files for the game. CMake will help you build and run the game across different platforms.
### Steps to Build and Run the Game:
1. **Install Dependencies**:
- Make sure you have [Raylib](https://www.raylib.com/) installed on your system.
- Ensure that you have **CMake** installed.
2. **Clone the repository**:
```bash
git clone https://github.com/yourusername/MiniGolf.git
cd MiniGolf
```
3. **Create a build directory and generate the Makefiles:**
```bash
mkdir build
cd build
cmake ..
```
4. **Build the game:**
```bash
make
```
5. **Run the game: After building, you can run the game with the following command:**
```
make run
```
This will compile (if not already comiled) and then run the game