Vladimir Chavdarov
Tools and Gameplay Programmer
Vladimir Chavdarov
Tools and Gameplay Programmer
Crystallize is a 2D top-down game, raytraced on the CPU.
🔧Engine/Language: C++
👥Team Size: Solo
⏳Duration: Feb. 2023 - Apr. 2023
💻Contributions: Many Lights | Reflections | Optimizations
🔗Code: github.com
🎮Game: itch.io
For this project, I did a variety of lighting features while keeping performance in mind. All were achieved through 2D maths, fully running on the CPU. I developed the following:
Rough shadows from straight and round obstructions.
Point lights and spot lights with different colors, range and intensity.
Mirrors with optional light multiplicators.
There are plenty of optimizations that can be done with raytracing and games that utilize them. I only scratched the surface with this project with what I did:
Shadow grid: The world is split into grid cells. If the color difference between the 4 points of the cell is too small, the cell is ignored, reducing calculations.
OpenMP multithreading and read-write responsibility separation per pixel
AABB early out: An AABB check is performed to see if a shape is on the screen or being affected by lighting. If both are true, only then perform shadow calculations.