Skip to content

Sephixum/SFML_Raycast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SFML raycasting engine

📖 Table of Contents

Table of contents
  • ➤ About The Project
  • ➤ Overview
  • ➤ Project Files Description
  • ➤ Getting Started
  • ➤ References
  • ➤ Credits
  • -----------------------------------------------------

    📝 About The Project

    I alway had the dream of combining math and programming in hopes of creating cool stuff with them, so after spending a bit of time searching I got advised to enter the world of graphics programming. this was my first choice as a project for this topic.

    -----------------------------------------------------

    ☁️ Overview

    This project is a simple implementation of a raycasting engine which will render a pseudo 3D world using 2D linear algebra calculations in order to cast rays and render the world based on them. Basically the further the ray is stopped and has hit a wall, smaller the height of the wall will be which is a stripe with length of one pixel.

    Gif not found

    -----------------------------------------------------

    💾 Project Files Description

    Headers and source files are separated into to different directories, include and src. Source files are all in src and defined headers are in include.

    • Globals.hpp - Where all Global settings are stored.
    • MyFuncs.hpp - Where commonly used functions are declared.
    • Game.hpp - Where all configuration of the application window and events are done.
    • Map.hpp - Where map and its logics are set up.
    • MyTriangle.hpp - This is a Draw able sprite for the map.
    • Player.hpp - Configuration for camera which is the player's eye.

    -----------------------------------------------------

    📖 Getting Started

    At first clone the repository:

    $ git clone https://github.com/Sephixum/SFML_Raycast.git

    As an exmaple you can first generate a build directory for cmake:

    $ cmake -S . -B build

    Build and compile:

    $ cmake --build build

    You can run the project:

    $ ./build/raycasting

    Usage

    You can move around the map using W A S D.

    Camera can be rotated with keys H (anticlockwise) and L (clockwise).

    Arrow key Down and Up can be used to increase of decrease vision density.

    You can reset your vision density with R.

    -----------------------------------------------------

    📔 References

    I have been studying concepts from Lode's Ray Casting Tutorial so here is the link for it.

    -----------------------------------------------------

    📜 Credits

    Special thanks to my dear friend MiliAxe for aiding me in designing and releasing this project.

    About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published