
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.
- Repo'yu clone'layın:
git clone https://github.com/fbkeskin/42-cub3D.git
- 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
.
- 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.
- Farklı map files ile çalışmak için 3. adımı tekrarlayın.
MinilibX, öğrenciler için tasarlanmış, yeni başlayanlara uygun, C dilinde basit bir X-Window programlama API'sidir.
Useful links:
- Lode's Raycasting Document
- Dounia's Medium Blogpost
- Harm Smits - MiniLibX
- MiniLibX
- Laura&Simon Gitbook
KEYBOARD | ACTION |
---|---|
W |
Move up |
S |
Move down |
A |
Move left |
D |
Move right |
> |
Rotate right |
< |
Rotate left |
ESC , ❌ |
Close the game window |