An open API service indexing awesome lists of open source software.

https://github.com/abdelrhman-ellithy/cg-cross-the-road-game

Computer Graphics project Cross the Road Game, an exciting 3D adventure where you navigate a ball to avoid cars and reach the end of the road
https://github.com/abdelrhman-ellithy/cg-cross-the-road-game

Last synced: 4 months ago
JSON representation

Computer Graphics project Cross the Road Game, an exciting 3D adventure where you navigate a ball to avoid cars and reach the end of the road

Awesome Lists containing this project

README

          

# 🚗🎮 **Cross the Road Game** đŸ›¤ī¸đŸŒŸ

Welcome to the **Cross the Road Game**, an exciting 3D adventure where you navigate a ball to avoid cars and reach the end of the road! 🚀✨

---

## 📜 **Table of Contents**
1. đŸ› ī¸ [Project Structure](#-project-structure)
2. đŸŽ¯ [Game Features](#-game-features)
3. 🎮 [Controls](#-controls)
4. 🚀 [Setup and Run](#-setup-and-run)
5. đŸ–ŧī¸ [Screenshots](#-screenshots)
6. đŸ—ī¸ [Development Notes](#ī¸-development-notes)
7. 📜 [License](#-license)

---

## đŸ› ī¸ **Project Structure**

This project is organized to ensure clarity and maintainability by following the **Single Responsibility Principle**.

```plaintext
📁 Project Folder
├── main.c # Program entry point 🏁
├── graphics.c # Rendering and visuals ✨
├── graphics.h # Header for graphics module 🎨
├── events.c # Handles user input (keyboard/mouse) đŸŽšđŸ–ąī¸
├── events.h # Header for events module đŸ–‹ī¸
├── game.c # Game logic (collisions, levels, attempts) đŸ•šī¸
├── game.h # Header for game module 🧠
├── texture.c # Texture loading utilities đŸ–ŧī¸
├── texture.h # Header for texture module 🌟
└── README.md # This document 📖
```

---

## đŸŽ¯ **Game Features**

- đŸžī¸ **Immersive 3D Environment**: Realistic textures and dynamic rendering.
- 🚗 **Moving Obstacles**: Avoid fast-moving cars to reach the end!
- đŸ•šī¸ **Progressive Difficulty**: Levels get harder as you advance.
- 🎮 **User Input**: Smooth and responsive controls for a fun experience.

---

## 🎮 **Controls**

| **Key** | **Action** |
|------------------|-----------------------------------------|
| `W` / `A` / `S` / `D` | Move the ball (Up / Left / Down / Right) |
| `Space` | Start a new game 🎉 |
| `ESC` | Quit the game ❌ |
| `P` / `O` | Increase / Decrease brightness 🌞🌙 |
| `Arrow Keys` | Adjust the camera view đŸŽĨ |
| `M` | Return to the main menu 🏠 |
| `L` | Advance to the next level 🚀 |

---

## 🚀 **Setup and Run**

1. đŸ–Ĩī¸ **Requirements**:
- OpenGL
- GLUT
- `stb_image` library (included)

2. 🔧 **Build and Run**:
```bash
gcc -o game main.c graphics.c events.c game.c texture.c -lGL -lGLU -lglut
./game
```

3. 🎮 **Play the Game**! 🚗✨

---

## đŸ–ŧī¸ **Screenshots**

_(Include screenshots or images of the gameplay here.)_

---

## đŸ—ī¸ **Development Notes**

- 🧩 **Modularity**: Each file handles a single aspect of the game.
- 🌟 **OpenGL**: Rendering and textures use OpenGL for smooth graphics.
- đŸŽī¸ **Physics**: Collision detection ensures realistic gameplay.

---

## 📜 **License**

This project is licensed under the MIT License. 📝
Feel free to modify and share the game!

---

🚀 **Enjoy playing the Cross the Road Game!** 🌟🎮