Skip to content

frederic-hallein/raycasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raycasting

Raycasting is a rendering technique used to create a 3D perspective in a 2D map. This code uses the DDA (= Digital Differential Analyzer) algorithm. The rendering is done using the SDL2 library.

How To Install & Run (Linux)

  1. Install the C++ compiler g++ using the following command:
sudo apt-get install g++

$~~~~~~~~$ To check which version is installed run the following command:

g++ --version
  1. Install the SDL2 library using the following command:
sudo apt install libsdl2-image-dev
  1. Clone the remote repository to your local machine using the following command:
git clone https://github.com/frederic-hallein/raycasting
  1. To compile the project, go inside the raycasting/ directory and run the following command:
make all

$~~~~~~~~$ This should create a main executable file in the same directory.

  1. Run the executable by using the following command:
./main

Controls

Character control is done using the wasd keys.

  • w : forward movement
  • a : backward movement
  • s : left camera rotation
  • d : right camera rotation

Screenshots

Screenshot from 2024-08-06 10-58-15 Screenshot from 2024-08-06 10-54-51

Releases

No releases published

Packages

No packages published