All Projects → drdanick → raycaster-sdl

drdanick / raycaster-sdl

Licence: MIT License
A simple raycasting demonstration using SDL2

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to raycaster-sdl

Hybridrenderingengine
Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
Stars: ✭ 563 (+2245.83%)
Mutual labels:  sdl2, 3d-graphics
MoravaEngine
2D/3D graphics engine written in C++ language. It currently supports the following graphics APIs: OpenGL 3.3+, Vulkan 1.2, DirectX 11. Its current purpose is to experiment with various CG concepts and techniques.
Stars: ✭ 129 (+437.5%)
Mutual labels:  raycasting, 3d-graphics
sdl2-raycast
SDL2 C++ raycasting engine with vertical movement, floor/ceiling texture mapping and sprites.
Stars: ✭ 80 (+233.33%)
Mutual labels:  sdl2, raycasting
Softwarerenderer
Software rendering engine with PBR. Built from scratch on C++.
Stars: ✭ 323 (+1245.83%)
Mutual labels:  sdl2, 3d-graphics
Embree viewer
Embree viewer is a simple implementation of a progressive renderer, based on Intel's Embree raytracing kernels. Its UI is written in SDL2, and it supports Alembic, OBJ file formats, with a JSON file to describe a scene.
Stars: ✭ 19 (-20.83%)
Mutual labels:  sdl2, 3d-graphics
ray engine
A toy raycasting engine in Go + Ebiten
Stars: ✭ 19 (-20.83%)
Mutual labels:  raycaster, raycasting
payton
Payton! Kickstart any 3D OpenGL + GTK Ideas in a few seconds!
Stars: ✭ 45 (+87.5%)
Mutual labels:  sdl2, 3d-graphics
SDL.zig
A shallow wrapper around SDL that provides object API and error handling
Stars: ✭ 102 (+325%)
Mutual labels:  sdl2
D3D12Renderer
Custom renderer and physics engine written from scratch in C++/Direct3D 12.
Stars: ✭ 17 (-29.17%)
Mutual labels:  3d-graphics
monolish
monolish: MONOlithic LInear equation Solvers for Highly-parallel architecture
Stars: ✭ 166 (+591.67%)
Mutual labels:  linear-algebra
Cpp-Examples
Numerical C++ examples.
Stars: ✭ 38 (+58.33%)
Mutual labels:  linear-algebra
wase-engine
A 2D game engine written in C++
Stars: ✭ 47 (+95.83%)
Mutual labels:  sdl2
EnttPong
Built for EnTT, at the request of the developer as a demo.
Stars: ✭ 51 (+112.5%)
Mutual labels:  sdl2
ArtOfIllusion
Art of Illusion modeling and rendering suite - core application and tools
Stars: ✭ 58 (+141.67%)
Mutual labels:  3d-graphics
Awesome-Math-Learning
📜 Collection of the most awesome Math learning resources in the form of notes, videos and cheatsheets.
Stars: ✭ 73 (+204.17%)
Mutual labels:  linear-algebra
koboredux
Kobo Redux - Kobo Deluxe Revived
Stars: ✭ 25 (+4.17%)
Mutual labels:  sdl2
RendererEngine
2D - 3D Renderer Engine builds with OpenGL, SDL2, C++
Stars: ✭ 17 (-29.17%)
Mutual labels:  sdl2
Pygame3D
Set of modules that use Pygame to display 3D graphics
Stars: ✭ 55 (+129.17%)
Mutual labels:  3d-graphics
spaceshippers
A spaceship simulation game written in Go that might be fun one day!
Stars: ✭ 28 (+16.67%)
Mutual labels:  sdl2
max
M.A.X. Port
Stars: ✭ 16 (-33.33%)
Mutual labels:  sdl2

Raycaster-SDL

A simple Ray Casting 3D engine using SDL as the rendering back-end.

Overview

This project is a typical textured Ray Casting engine akin to games like Wolfenstein 3D, Blake Stone, etc.

The crux of this program is not that it is an efficient implementation, or that it contains special rendering features. Instead, this Ray Caster is unique (as far as I have seen) in that the engine is built almost entirely on top of fundamental Linear Algebra concepts (vectors, transformation matrices, vector projection, etc.), even down to stepping vector calculation, which uses a modified form of vector projection.

The rationale for this is simply that this was designed as a teaching aide for students in a computer graphics course to help solidify their knowledge of fundamental Linear Algebra concepts (and also give them something nice to look at).

On that note, there does exist accompanying teaching material for this Ray Caster which I authored - but since I do not currently have permission from the relevant academic institution, I cannot upload those. If time permits, and if there's interest, I'd be more than happy to produce some new material to help people understand how this engine works.

Requirements

This project requires the following libraries:

  • SDL2

Compiling

Unlike most of my other projects, this project does not rely on any build system. To compile the project, simply navigate to the root of the project and enter the following command:

gcc -lm -lSDL2 -O2 src/*.c -o raycaster

Running

To run the Ray Caster, enter ./raycaster into your shell.

Using the Ray Caster

The Ray Caster accepts the following controls:

Left Turn left.
Right Turn right.
Up Move forward.
Down Move backward.
Shift Hold to move twice as fast.
t Toggle between textured and untextured rendering.
m Toggle the full screen map on/off.
f Toggle the barrel distortion correction on/off.
[ Decrease the distance to the viewplace (increase FOV)
] Increase the distance to the viewplace (decrease FOV)
escape Quit the game.

Screenshots

untextured textured map

Licence

See LICENCE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].