Skip to content

flowerbuddies/cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3D

cub3D loads a 2D map visualized by a classic "3D" rendering technique known as raycasting, popularized by the classic Wolfenstein 3D game (1994).

cub3D demo

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.

Build

Prerequisites

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

Step 1: Clone the repository

Clone the repository along with its submodules.

git clone --recurse-submodules https://github.com/flowerbuddies/cub3d
cd cub3d

Step 2: Build the executable

The Makefile includes instructions to build the submodules and the cub3D executable

make

Step 3: Run cub3D with a demo map

The Makefile includes instructions to build the submodules and the cub3D executable

./cub3D assets/maps/hd.cub

Controls

Move

W forward S backward A left D right

Look

mouse or arrow keys to look left or right

About

Raycasting maze game engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published