Skip to content

HishamEltayb/Cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔸 CUB3D 🔸

(RayCasting with miniLibX)♨️

3e5f962b44c632a819141d61fd8558b55a0d07cc

About the project   |    Technologies   |    Getting started   |    How to contribute   |    License

👨🏻‍💻 About the project

This project is inspired by the world-famous Wolfenstein 3D game, which was the first FPS ever. It will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you’ll have to find your way.

Note:You can check the Cub3d.pdf

Screen Shot 2024-08-15 at 1 21 32 PM

Introduction

  • The idea behind ray casting is to trace rays from the eye, one per pixel, and find the closest object blocking the path of that ray – think of an image as a screen-door, with each square in the screen being a pixel. This is then the object the eye sees through that pixel.

🔍 Importance of Ray-Casting:

  • Understanding the basics of 3D rendering and graphics.

  • Learning about the intersection of rays and objects in 3D space.

  • Developing problem-solving skills in a graphical context.

💡Implemetation:

The system integrates multiple components to ensure a seamless and interactive 3D rendering process:

  • Ray-Casting Algorithm: Implemented in C, handling the core logic of tracing rays and detecting intersections with objects.

  • 3D Rendering: Utilizing the MiniLibX library for rendering the 3D environment.

Rendering Process:

  1. Initialization: Setting up the 3D environment and initializing the ray-casting algorithm.

  2. Ray-Casting: Tracing rays from the eye, one per pixel, and detecting intersections with objects.

  3. Rendering: Rendering the 3D environment based on the intersection points and object properties.

Screen Shot 2024-08-15 at 1 31 01 PM

🚀 Technologies

Technologies used to develop Cub3D:

💻 Getting started

6

Prerequisites

  • C Compiler: Ensure you have a C compiler installed (e.g., GCC).
  • MiniLibX Library: Ensure you have the MiniLibX Library installed.

Installation

1. Clone the project and access the folder

git clone https://github.com/HishamEltayb/Cub3d.git && cd Cub3d

2. Use Makefile

   make -j && make run

3. Movement and Rotation

Key Action
W Move forward
S Move backward
A Move left
D Move right
→ (Right arrow) Rotate right
← (Left arrow) Rotate left

🤔 How to contribute

Make a fork of this repository

# Fork using GitHub official command line
# If you don't have the GitHub CLI, use the web site to do that.

$ gh repo fork HishamEltayb/Cub3d

Follow the steps below

Clone your fork

$ git clone your-fork-url && cd Cub3d

Create a branch with your feature

$ git checkout -b my-feature

Make the commit with your changes

$ git commit -m 'feat: My new feature

Send the code to your remote branch

$ git push origin my-feature

License

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

Acknowledgements

This project is a group effort, and I would like to extend a heartfelt thank you to Ali Hussain for his exceptional work and expertise. His contributions were invaluable to the success of this project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •