/Simple2DRaycaster

Simple C++ SDL2 raycaster engine

Primary LanguageC++

Simple2DRaycaster

A simple 2D raycasting engine built using SDL2 that simulates a day/night cycle, complete with a dynamic sky and stars. This project demonstrates basic raycasting techniques to render walls and objects, providing an interactive environment where the player can move around and explore.

Features

  • Raycasting Engine: A basic 2D raycasting engine that renders walls based on player movement and viewing angle.
  • Day/Night Cycle: The time of day dynamically changes, with the sky transitioning from light blue during the day to dark blue at night. Stars appear when the night begins.
  • Interactive Player Movement: The player can move forward, backward, and rotate left or right using the keyboard.

Getting Started

Prerequisites

  • SDL2: The project uses the SDL2 library to handle graphics and input. You will need to have SDL2 installed to build and run this project.

    • On Ubuntu:
      sudo apt-get install libsdl2-dev
    • On macOS (using Homebrew):
      brew install sdl2
  • C++ Compiler: Ensure you have a C++ compiler (such as g++ or clang++) to build the project.

Images

image image