Skip to content

Group project done by @nicolasgasco and @isolinis. A small Wolfenstein-inspired video game done with raycasting and MiniLibX.

Notifications You must be signed in to change notification settings

nicolasgasco/42_cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cube3D

42 group project done by @nicolasgasco and @isolinis. Small 3D video game inspired by Wolfenstein 3D that leverages raycasting to create a sense of tridimensionality. Written in C using 42's own graphical API miniLibX.

screencast-nimbus-capture-2022_08_12-17_53_56_lqj089

Project breakdown

The project roughly involved:

  • Parsing and validating the scene description file passed as argument to the program, as shown in this example:
    // Textures according to orientation
    NO ./path_to_the_north_texture
    SO ./path_to_the_south_texture
    WE ./path_to_the_west_texture
    EA ./path_to_the_east_texture
    
    // Floor and ceiling colors
    F 220,100,0
    C 225,30,0
    
    // Map
    111111
    100001
    111111
    
  • Transforming the data in a way that can be easily fed to the graphical API
  • Doing the raycasting calculation to render the scene
  • Adding player movement

Features

  • Customizable textures (XPM) that vary according to orientation (North, South, West, East)
  • Customizable ceiling and floor colors
  • Player movement (vertical with W and S, horizontal with A and D)
  • View rotation with left and right arrow keys in mandatory (src folder) and by moving the mouse horizontally in bonus (bonus folder).

Run the program (macOs only)

git clone https://github.com/nicolasgasco/42_cub3d.git
cd 42_cub3d

# For mandatory (player rotation with arrow keys)
make
./cub3D /maps/scene.cub

# For bonus (player rotation with mouse)
make bonus
./cub3D_bonus /maps/scene.cub

About

Group project done by @nicolasgasco and @isolinis. A small Wolfenstein-inspired video game done with raycasting and MiniLibX.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published