Skip to content
/ cub3d Public

A raycasting engine to power games like Wolf3D or Doom

Notifications You must be signed in to change notification settings

aascedu/cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cube3D

Cub3D

This project is part of the 42 school curriculum and aims to recreate a game engine using raycasting to simulate a 3D environment in the style of old-school first-person view games.

Table of Contents

About

Cub3D is a project that challenges you to create a simple 3D game engine from scratch using the C programming language and the MiniLibX (graphical library).

The main objective is to create a maze-like 3D environment where the player can navigate. The project involves implementing a raycasting algorithm to determine the distance and direction of objects in the game world, allowing the creation of the 3D illusion.

Features

  • A player can move within the 3D maze using the arrow keys.
  • Walls and other obstacles are textured to give a 3D appearance.
  • The player can rotate the camera to look around.
  • The game displays a HUD (Heads-Up Display) showing relevant information such as the player's position, direction, and frame rate.
  • The game includes a sprite feature, allowing you to render objects with different depths in the 3D environment.

Screenshots

Cub3D

Usage

Instructions

1. Compiling & Executing the program

To compile and execute the program, run:

$ make
$ ./cub3D map.cub

Replace map.cub with the path to your custom map file. The map file defines the layout of the 3D environment, including the textures, sprite positions, and player starting position.

2. Special Compiling Rules

To compile the program with fsanitize, run:

$ make debug
$ ./minishell

To compile the program with valgrind, run:

$ make leaks

Controls

  • : Move forward.
  • : Move backward.
  • : Move left.
  • : Move right.

Resources

Authors

About

A raycasting engine to power games like Wolf3D or Doom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published