Skip to content

Sur1ive/42tokyo_cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3d

Final grade: 105%

This project is a 3D renderer created in collaboration with @ARATA. It utilizes the ray-casting algorithm, famously used in early 3D games like Wolfenstein 3D, to render a 2D map file into a first-person 3D perspective. The engine supports custom wall textures and ceiling/floor colors.

Usage:

  1. Compile the project:
make
  1. Run the renderer
./cub3D <map file>

# example
./cub3D maps/map.cub

Controls

  • W, A, S, D Key: Move the camera.
  • , Key: Rotate the camera/view.

Example Map File

  • NO, SO, WE, EA: Path to the texture for North/South/West/East-facing walls.
  • F, C: RGB color for the Floor and Ceiling.
  • 1: a solid wall.
  • 0: empty space.
  • N, S ,W ,E: the Camera's starting position and initial viewing direction
NO ./textures/Textures-1.xpm
SO ./textures/Textures-2.xpm
WE ./textures/Textures-3.xpm
EA ./textures/Textures-4.xpm

F 99,62,0
C 102,170,255

111111111111111111111111
10000000000000000000001
 1000000000000000000001
  10000000S00000000001
   100000000100000001
    1000000000000001
     10000000000001
      100000000001
       1000000001
        10000001
         101101
          1001
           11

About

Final grade: 105% | 42 school level 4 project. A 3D renderer with ray-casting algorithm.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages