Skip to content

Latest commit

 

History

History
89 lines (68 loc) · 3.35 KB

README.md

File metadata and controls

89 lines (68 loc) · 3.35 KB

🕋cub3D🕋

"This project is inspired by the world-famous Wolfenstein 3D game, which is considered the first FPS ever created. It will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, where you will have to find your way."

My first RayCaster with miniLibX!


This project’s objectives are similar to all this first year’s objectives: rigor, use of C, 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.
In conclusion, cub3D is a remarkable playground to explore the playful practical applications of mathematics without having to understand the specifics. With the help of numerous documents available on the internet, you will use mathematics as a tool to create elegant and efficient algorithms.


📝Usage

  1. Repo'yu clone'layın:
git clone https://github.com/fbkeskin/42-cub3D.git
  1. Makefile'ı kullanarak source kodu derleyin:

Unutmayın, mevcut MLX library yalnızca Linux machine'lerde çalışmaktadır.

make

1 executable file oluşmaktadır: cub3D.

  1. Oynamak istediğiniz map'i argüman olarak girin ve cub3D binary dosyasını execute ederek programı başlatın:

Projenin kök dizininde scene_description_files klasörü altında yer alan valid map'lerden birini tercih edebilirsiniz.

$>./cub3D scene_description_files/valid/works.cub

$>./cub3D scene_description_files/invalid/color_none.cub
Error
Element has incorrect type identifier!

$>./cub3D "map.buc" 
Error
not cub file

$>./cub3D life gave me some lemons so i made some lemonade
Error
The number of arguments must be 2!

Program, bilgisayarınızda bir window açarak oyun arayüzünüz ile etkileşime geçmenizi sağlar. Amaç, 2D window üzerinde raycasting tekniğini kullanarak 3D bir görüntü elde etmektir. Oyuncu, labirent içinde dolaşır.

  1. Farklı map files ile çalışmak için 3. adımı tekrarlayın.

📚MLX

MinilibX, öğrenciler için tasarlanmış, yeni başlayanlara uygun, C dilinde basit bir X-Window programlama API'sidir.

Useful links:

🎮CONTROLS

KEYBOARD ACTION
W Move up
S Move down
A Move left
D Move right
> Rotate right
< Rotate left
ESC, Close the game window