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
- Host: GitHub
- URL: https://github.com/abdelrhman-ellithy/cg-cross-the-road-game
- Owner: Abdelrhman-Ellithy
- License: mit
- Created: 2024-12-24T20:05:28.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-24T20:07:13.000Z (11 months ago)
- Last Synced: 2025-06-21T10:03:57.748Z (5 months ago)
- Language: C
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!** đđŽ