Skip to content

ElPatatin/cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3d

By @ElPatatin & @LAG-jara

Description

cub3d is a simple 3D game engine project that uses the Raycasting technique. It is inspired by the classic game Wolfenstein 3D. The project is part of the 42 Network curriculum.

Features

  • Raycasting for rendering a 3D perspective
  • Textured walls and sprites
  • Basic movement controls (forward, backward, strafe left, strafe right)
  • Basic mouse camera rotation (must mantain the mouse button 1 pressed)
  • Collision detection with walls
  • Support for reading map configurations from a file
  • Basic error handling and reporting

Prerequisites

  • 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 repository:
    git clone https://github.com/ElPatatin/cub3d.git cub3d
  2. Acces de cloned directory
    cd cub3d
  3. Build the project:
    make

Usage

  1. Run the cub3d executable:
    ./cub3d path/to/map.cub

Replace path/to/map.cub with the path to your map configuration file.

  1. Enjoy playing around with the simple 3D engine!

Map Configuration

cub3d uses a simple map configuration file with specific parameters. Refer to the provided basic.cub file for an example.

Controls

  • W: Move forward
  • S: Move backward
  • A: Strafe left
  • D: Strafe right
  • ←: Look left
  • →: Look right
  • ESC: Exit the game
  • Mouse:
    • ←: Look left
    • →: Look right

Screenshots

Dungeon.cub basic1.cub basic2.cub

Known Issues

NONE 😇

License

This project is licensed under the MIT License.

About

A 3D engine using ray-casting technique, project by @ElPatatin & @LAG-jara

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published