cub3d is a graphical project that implements graphical 3D maze generation one can walk in using raycasting algorithm. It was inspired by the cult classic Wolfenstein 3D. It uses mlx library that runs on top of X11.
The project depends on X11 library, so if you use Wayland, you'll have to install Xwayland to use it.
git clone https://github.com/emuminov/cub3d
cd cub3d
make
./cub3D maps/flagship.cubMaps available for use are located in maps/ and tests/cub3D/maps/good/.
- Maps are generated based on maps: text files with
.cubextension and specific format that describes color of the ceiling, color of the floors,.xpmfiles for the wall textures facing different directions and the layout of the maze itself. - Dynamic resizing of
.xpmassets at the start of the program. - Movement using
WASD, rotation using arrow keys. - Proper collision detection that also uses raycasting.
- Doors that are togglable with
E. - Transparent minimap that shows field of vision of the player.
- Fog that blends ceiling color into walls that are distant enough.
- Animated hands of the player character (PC). PC can pull up a flower with
SPACE. - Game can be compiled for the mous support (used for PC rotation).
As a team, we were working on every part of the project together, but our main responsibilities were:
Eldar Muminov/emuminov: lead, DDA algorithm, controls, collision, doors, minimap, fog
Celiastral/eandre: image resizing algorithm, wall texturing, map parsing, hand sprites (drawing, implementation and animation)