Skip to content

willrsq1/cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3D

Cub3D is a 42 school team project to create a dynamic view inside a 3D maze. Using the MiniLibX library, we must implement raycasting in the style of the famous Wolfenstein 3D game, the first true FPS in videogame history.

Gameplay

When launching the bonus part, you will have three difficulties available. You will always start at level 1. Every level spawns you on a map that will contain ennemies for you to kill.

Every 4 seconds, ennemis will spawn other ennemies nearby themselves. Soon, they will be everywhere on the map! And if they do, you lose.

You go to the next level by killing every ennemy on the map.

Be carefull, some levels can be quite challenging.. But wounded ennemies have different states, maybe some of them could come in handy ? ..

Game screeshots

At launch: image image

First level: image

Second level: image

Third level: image

Help and escape menus: image image

Wounded ennemies: image

Final level: image

Have fun ! :)

Compile and Run

There are two versions of the program, the mandatory part and the bonus part. The bonus part adds wall collision, a minimap, and the ability to rotate the view by moving the mouse. Furthermore, we made the bonus part out to be a FPS game. It is pretty fun to play !

To compile the mandatory part, cd into the cloned directory and:

make

To compile the bonus part, cd into the cloned directory and:

make bonus

To run the basic program:

./cub3D <path/to/map.cub>

To run the bonus part (the game), don't use any arg:

./cub3D_bonus

The program takes a map file as an argument. Maps are available in the maps directory. There are good maps which the program should run smoothly with, and bad maps which the program should reject. For example:

  • ./cub3d maps/big_map.cub should run.

  • ./cub3d maps/bad/filetype_wrong.buc should print an error and abort.

Controls

Controls for movement and rotation are:

  • W: move forward
  • S: move backward
  • A: strafe left
  • D: strafe right
  • left arrow: rotate left
  • right arrow: rotate right
  • mouse: rotate by moving the mouse (bonus only)
  • H: displays a help menu with all available commands (bonus only)
  • ESC: pause/exit the game
  • Space: attack
  • 1 and 2: switch weapons (sword and shotgun)
  • Many others (see help menu ingame)

💪 Contributers

ABDYLI Arbesa
 42intra profile : aabdyli

RUET SUQUET William
 42intra profile : wruet-su

Peer review

image

Final Grade

image

Description inspired by mcombeau

About

FPS game in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published