Skip to content

Project 11: Cub3D - Eleventh project for the formation of software engineers at school 42 São Paulo.

Notifications You must be signed in to change notification settings

Vinicius-Santoro/42-formation-lvl2-11.cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-formation-lvl2-11.cub3d

Project 11: Cub3D - Eleventh project for the formation of software engineers at school 42 São Paulo.

  • This project is inspired by the world-famous Wolfenstein 3D game. Our goal is to create a raycaster.

This project was like this:

lucas

Linkedin Linkedin

How to run

  • Clone the repository
git clone git@github.com:Vinicius-Santoro/42-formation-lvl2-11.cub3d.git
  • Run make to compile common part.
  • To clean objects files execute: make clean
  • To clean executable file and objects: make fclean
  • Recompile: make re
  • Run ./cub3D or followed by map path e.g. ./assets/maps/map42.cub

File configuration

To run the game, you must pass as first argument a scene description file with the .cub extension.

Identifiers

The file must have 6 element identifiers:

Identifier Description
NO Represents the texture of the wall in the north direction
SO Represents the wall texture in the south direction
WE Represents the wall texture in the west direction
EA Represents the wall texture in the east direction
C Represents the RGB color scale of the celling
F Represents the RGB color scale of the floor

Example in a .cub file:

NO ./assets/Images/north.xpm
SO ./assets/Images/south.xpm  
WE ./assets/Images/west.xpm
EA ./assets/Images/east.xpm  

F 200,200,200
C 0,0,0

Map configuration

The map construction is composed by the following characters:

  • Walls: '1'
  • Empty spaces inside: '0'
  • Empty spaces outside: ' '
  • Initial player direction: 'N', 'S', 'W' or 'E'

Map Rules

  • It must be completely surrounded by walls
  • It must have a player

Map example:

1111111111111111111111111111111111111
1000000000000000000000000000000000001
1001111000001111000001111111111111001
1001111000001111000001111111111111001
1001111000001111000001111111111111001
1001111000001111000000000000001111001
1001111111111111000001111111111111001
1001111111111111000001111111111111001
1000000000001111000001111111111111001
1000000000001111000001111000000000001
1000000000001111000001111111111111001
1000000000001111000001111111111111001
100000000000000000N000000000000000001
1111111111111111111111111111111111111

How to play

  • The '→' and '←' keys of the keyboard allow you to look left and right in the maze.
  • The 'W', 'A', 'S' and 'D' keys allow you to move the point of view through the maze.
  • 'Esc' key exits the game.

Necessary concepts

Details of the entire project

About

Project 11: Cub3D - Eleventh project for the formation of software engineers at school 42 São Paulo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published