cub3D loads a 2D map visualized by a classic "3D" rendering technique known as raycasting, popularized by the classic Wolfenstein 3D game (1994).
This project is developed in C with restricted usage of its standard library and a basic rendering library. Graphics rendering and window management via OpenGL and GLFW MLX42. I also use libft, a custom subset of the standard C library, which I made to familiarize myself with the language.
Before you begin, ensure you have the following software installed on your system:
- cc or gcc or clang: a C compiler to build the executable
- make: to simplify the build process
- pkg-config: used to dynamically set the compiler and linker flags needed for GLFW
- GLFW: a library for creating OpenGL windows and receiving inputs and events.
on macOS, these prerequisites are easily met by installing command-line-tools and brew, then:
brew install glfw pkg-config
Clone the repository along with its submodules.
git clone --recurse-submodules https://github.com/flowerbuddies/cub3d
cd cub3d
The Makefile includes instructions to build the submodules and the cub3D executable
make
The Makefile includes instructions to build the submodules and the cub3D executable
./cub3D assets/maps/hd.cub
W forward S backward A left D right
mouse or arrow keys to look left or right