matihope / RayCaster

A "3D" SFML Ray Casting game.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ray Caster

A simple, but fun ray casting engine written in C++ and SFML 2.6. It uses similar display technique to Wolfenstein 3D (1992) - for each horizontal pixel it casts a ray and the shorter the ray, the longer the texture drawn on the screen.

Controls are simple - WASD to move, RIGHT and LEFT arrow to rotate.

First screenshot from the game Second screenshot from the game

Build it yourself:

  1. Install dependencies:

    • Arch Linux:
      sudo pacman -S cmake sfml nlohmann-json
    • Debian / Ubuntu:
      sudo apt-get install cmake libsfml-dev nlohmann-json3-dev
  2. Build project and run:

bash -c "git clone https://github.com/matihope/RayCaster.git && \
    cd RayCaster && \
    cmake -B build && \
    cd build && \
    make -j 3 && \
    cd .. && \
    ./RayCaster"

List of attributions:

About

A "3D" SFML Ray Casting game.


Languages

Language:C++ 97.3%Language:CMake 2.7%