Skip to content
/ cub3D Public
forked from apresas-97/cub3D

A recreation of the Wolfenstein 3D videogame using Raycasting

License

Notifications You must be signed in to change notification settings

cosmic3d/cub3D

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CUB3D

The supreme raycaster

license last-commit repo-top-language repo-language-count

Developed by 😼​apresas-97 and 🌚​cosmic3d with the software and tools below.

GNU%20Bash C 42 MLX Makefile


🔗 Quick Links


📍 Overview

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.


📦 Features

  • Raycasting technique used to draw walls
  • Player and camera movement on X and Y axes
  • Wall colisions
  • Wall textures
  • Animated sprites and interactive doors

🚀 Getting Started

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)

⚙️ Installation

  1. Clone the cub3D repository:
git clone https://github.com/apresas-97/cub3D.git
  1. Change to the project directory:
cd cub3D
  1. Compile the project:
make

🤖 Running cub3D

Use the following command to run cub3D:

./cub3D <map>

Where <map> is a file with the .cub extension


🎮 Controls

  • WASD for moving the player
  • ⬅️➡️ or 🖱️ and left click for moving the camera
  • E for opening doors
  • ESC for closing the game

📹 Game footage

bonus_albertdreams.mov
bonus_spelunky.mov

🛠 Project Roadmap

  • ► 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

🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone https://github.com/apresas-97/cub3D.git
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. 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.


📄 License

This project is protected under the MIT License. For more details, refer to the LICENSE file.


Return


About

A recreation of the Wolfenstein 3D videogame using Raycasting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 83.3%
  • Objective-C 7.6%
  • Roff 5.6%
  • Makefile 2.9%
  • Other 0.6%