Skip to content

JeremieSiller/cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3d

Table of contents

  1. About
  2. Description
  3. minilibX
  4. libft

About

cub3d is a project of the 42 core curriculum with the purpose of learning about graphics, windows, events, colours and more. The task is to write a 3D game similar to Wolfenstein 3D using a raycasting algorithm. The school provides a small library to use which only contains some really basic functions.

Screen Shot 2022-02-21 at 5 27 20 PM

how to use:

Clone the repository:

git clone --recursive https://github.com/JeremieSiller/cub3d/

run make to compile the programm

make

execute the programm with a .ber file

./cub3D map.cub

to start the game the config file needs to follow some rules else it will just return an error. (For more information look into Description)

Description

how to play:

  • use W A S D to move
  • use the mouse to turn
  • press ESC to get to the pause menu
  • press ESC again to quit or return to continue the game

a valid config file...

  • ends on .cub
  • contains a ceiling and floor colour (C/F) in a format: "R,B,G"
  • contains a path to a texture for each wall and direction (NO/SO/WE/EA) (texture has to be a valid xpm file)
  • contains at the bottom of the file a valid map

a valid map...

  • is sorrounded by walls (1)
  • contains exactly one player with its looking direction (N/W/E/S)
  • can contain some coins (C) and some empty space (0)

You can find an example config in the directory called "map.cub"

miniLibX

the project uses miniLibx a basic window mangement library. You can find it here: https://github.com/42Paris/minilibx-linux

libft

the project uses the submodule libft which is an earlier project of the 42 core curriculum. You can find mine here: https://github.com/ayeCaptainJack/libft

About

small 3D game using raycasting for rendering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published