Skip to content

Ehlzz/cub3D

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cub3d - (Cybercube)

Table of Contents

About

Cub3d is a 3D game project developed as part of my 42 curriculum. It is inspired by Wolfenstein 3D (or Doom) and implements raycasting techniques to create an immersive gaming environment.
I recommend playing the bonus version since it’s the main project but improved!
It’s worth noting that we completed this project in approximately three weeks. While the result is satisfying, some planned features were abandoned due to time constraints (we wanted to move on to another project).
These include randomizing the walls, correctly displaying doors, enemies, or bullet impacts.

Screencast from 06-12-2024 03_55_23 PM

Features

  • Loading maps from text files (Manda)
  • 3D rendering engine using raycasting (Manda)
  • Player movement (Manda)
  • Camera rotation (Manda)
  • Collision detection with walls (Bonus topic)
  • Mini-map showing player position (Bonus topic)
  • Mouse control gameplay (POV and Shoot) (Bonus topic/personal)
  • Doors (Bonus topic)
  • Stamina (Personal bonus)
  • Menu + Settings (Personal bonus)

Screenshot from 2024-06-12 15-22-28

Installation

To install and run Cub3d, follow these steps:

  1. Clone the Git repository:

    git clone https://github.com/Misthaa/cub3D.git cub3d
    cd cub3d
  2. Compile the project:

    make
  3. With Bonus:

    make
    make bonus
  4. Run the game:

    ./cub3d assets/maps/map_manda/bonus.cub

Usage

Use the following keys to play the game:

  • W: Move forward
  • S: Move backward
  • A: Move left
  • D: Move right
  • Shift: Run
  • Left Arrow: Rotate camera left
  • Right Arrow: Rotate camera right
  • Escape: Quit the game/Menu
  • Mouse: Rotate camera left/right
  • Left Click: Shoot

Dependencies

Cub3d requires the following dependencies:

  • OS: Does not work correctly on macOS.
  • Vulkan: This mlx (MacroLibx) depends on Vulkan to function.
  • gcc: The C compiler.

Make sure these dependencies are installed before compiling the project.

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 76.9%
  • C 22.0%
  • Other 1.1%