Welcome to the Raycasting Engine project, an implementation of a DOOM Style renderer using modern C++ and technologies like raylib and imgui.
This project is developed in a recreational programming context, it does not aim to be production ready at some point. It serves as a learning experience to explore new concepts and technologies while creating a project around them.
The primary goal of this project is to implement a DOOM Style Renderer with a simple Engine around it and a Graphical Editor for prototyping Maps, rendering, gameplay etc... I'm using modern C++ and technologies like raylib and imgui it achieve this goal. At the end the engine should be able to build and ship a standalone executable without the editor.
For now the project in a prototyping phase, still mainly focused in making an efficient Renderer.
Renderer
- DOOM Style rendering including :
- Sectors and top/bottom Elevation
- Neighbouring sectors sides
- Textures for Wall & Borders
- Pitch and Yaw for camera movement
- Ceiling and floor casting
- Vignette for sprites rendered over walls
- Entities sprites within the 3D space
- Basic Physics including :
- Elevation related to sectors
- Simple gravity
- 3D space Raycast
- Simple shading using far plane distance
- Dynamic lighting for light sources
Editor
- 3D View
- Simple inspector for Global world objects (Physics, Camera, etc...)
- Rendering Debugger including :
- Step by step rendering
- Rendering steps visalizer
- Map Editor including :
- Controls (zoom, move, ...)
- [IN_PROGRESS] Sector Editor
- Elevation editor
- Proper sectors rendering
- Sector creation tool
- Wall creation tool
- Portal creation/visualisation tool
- Vignet editor
- Sprite editor
- Texture Browser System
- Project instance cration : being able to create a project witch is using the engine and editor in one click
- Simple assets serealization / deserialization system
- standards containers (std::map, std::vector, std::string)
- Map / Entities
- Enable user to implement serialization for his own Asset types
- Project shiping including :
- Release Build
- Assets bundle
Debug / Enhancement
- Fix Sector elevation computation
This repo toolchain as been created using my cmake and vcpkg template.
Windows :
Make sure you installed Visual Studio with C and C++ support and C++ linux development with cmake. Make sure you installed CMake as well.
GNU/Linux (apt) :
Install necessary build tools and a C/C++ compiler
sudo apt-get update
sudo apt-get install cmake build-essential tar curl zip unzip autoconf libtool g++ gcc
Then run the bootstrap script
# Unix
./scripts/bootstrap-workspace.sh
# Windows
.\scripts\bootstrap-workspace.bat
Generate the cmake project :
# For debug build
# Unix
./scripts/generate-cmake-debug.sh
# Windows
.\scripts\generate-cmake-debug.bat
# For release build
# Unix
./scripts/generate-cmake-release.sh
# Windows
.\scripts\generate-cmake-release.bat
Compile :
# For debug build
# Unix
./scripts/build-debug.sh
# Windows
.\scripts\build-debug.bat
# For release build
# Unix
./scripts/build-release.sh
# Windows
.\scripts\build-release.bat
Run the program
You can now run the compiled program by looking into out/Debug
or out/Release
.
The out directory hierarchy will be different depending on your generator.
For exemple with Make generator in Debug mode run your program like that
# Unix
./out/Debug/raycasting-engine
# Windows
.\out\Debug\raycasting-engine.exe
Using Visual Studio Code workspace
If you are using visual studio code you can directly use the project embeded workspace .vscode/raycasting-engine.code-workspace
.
You can press F5
to build and run with debugger gdb or vsdbg (visual studio debugger).
This project is open-source and available under the MIT Licence.