Skip to content

This project is inspired by the world-famous Wolfenstein 3D game, which was the first FPS ever. It will enable you to explore ray-casting. The goal will be to make a dynamic view inside a maze.

Notifications You must be signed in to change notification settings

42YerevanProjects/cub3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42 Cub3D

This project’s objectives are similar to all this first year’s objectives: Rigor, use of C, use of basic algorithms, information research etc. As a graphic design project, cub3D will enable you to improve your skills in these areas: windows, colors, events, fill shapes, etc. To conclude cub3D is a remarkable playground to explore the playful practical applications of mathematics without having to understand the specifics. With the help of the numerous documents available on the internet, you will use mathematics as a tool to create elegant and efficient algorithms.

⚠️ Warning: Don't copy/paste code you don't understand: it's bad for you, and for the school.

Description

The goal of this project was to create a basic first-person maze like the old Wolfenstein 3D, using raycasting.

Features

Mandatory part:

  • A custom map can be create using a .cub file including :
    • Different wall textures that vary depending on which side the wall is facing (North, South, East, West).
    • Different floor and ceiling colors using RGB.
    • Doors and enemies position (X, Y).
    • The map file itself. (1 = wall, 0 = floor).
    • A player facing a direction (N, S, E, W)
  • A 3D rendering of a map file.

Bonus part:

  • Wall collisions.
  • A minimap system.
  • Doors which can open and close.
  • Animated sprite (gun and enemies).
  • Rotate the point of view with the mouse.
  • Custom transparency.

Note: Our code does not contain the bonus part!

Commands

Key must be change between mac or linux in includes/cub3d.h or includes/cub3d_bonus.h

Key Command
<-- or --> Look left and right
W, A, S, D Move
ESC Quit

Resources

About

This project is inspired by the world-famous Wolfenstein 3D game, which was the first FPS ever. It will enable you to explore ray-casting. The goal will be to make a dynamic view inside a maze.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published