The supreme raycaster
Developed by 😼apresas-97 and 🌚cosmic3d with the software and tools below.
CUB3D is a graphics project from the 42 campus. The goal was to create a 3D environment using a technique called Raycasting and the MinilibX library from the C programming language.
- Raycasting technique used to draw walls
- Player and camera movement on X and Y axes
- Wall colisions
- Wall textures
- Animated sprites and interactive doors
Requirements
Ensure you have the following dependencies installed on your system:
-
Requirements for MacOs
- clang
- make
- This native version no longer uses X.org, XQuartez or X11 but uses Mac OSX's Cocoa (AppKit) and modern OpenGL features.
-
Requirements for Linux
- MinilibX only support TrueColor visual type (8,15,16,24 or 32 bits depth)
- gcc
- make
- X11 include files (package xorg)
- XShm extension must be present (package libxext-dev)
- Utility functions from BSD systems - development files (package libbsd-dev)
- e.g. sudo apt-get install gcc make xorg libxext-dev libbsd-dev (Debian/Ubuntu)
- Clone the cub3D repository:
git clone https://github.com/apresas-97/cub3D.git
- Change to the project directory:
cd cub3D
- Compile the project:
make
Use the following command to run cub3D:
./cub3D <map>
Where <map> is a file with the .cub extension
WASD
for moving the player⬅️➡️
or🖱️ and left click
for moving the cameraE
for opening doorsESC
for closing the game
bonus_albertdreams.mov
bonus_spelunky.mov
-
► Raycasting technique used to draw walls
-
► Camera and player movement
-
► Textures are correctly drawn on the walls
-
► Better map parser
-
► Animated sprites and doors added
-
► Some custom maps added
-
► Multiplayer
Contributions are welcome! Here are several ways you can contribute:
- Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Report Issues: Submit bugs found or log feature requests for Cub3d.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a Git client.
git clone https://github.com/apresas-97/cub3D.git
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
Once your PR is reviewed and approved, it will be merged into the main branch.
This project is protected under the MIT License. For more details, refer to the LICENSE file.