Weird Engine
Engine:
Unity
Size of the team:
6
Time:
4 months
My role:
Programmer
Summary
A 2D game engine in C++ with OpenGL, using signed distance functions (SDFs) for rendering and physics. Key features:
- ECS architecture to structure and connect components.
- Custom physics engine optimized for SDFs.
- Fast SDF renderer.
The story
This project started as a 3D renderer engine that seamlessly combined traditional triangle rasterization
with SDF Ray Marching. This was quite a challenge, but eventually I got it working as intended.

Then I decided I wanted to turn it into a usable engine, but I quickly realized the scale of what I was
trying to do and the implications of trying to get an acceptable performance using such an expensive
rendering technique.
The retro aesthetics were not a design choice, but rather a technical limitation. The rendering
algorithm's complexity grew exponentially with the amount of objects, so it required implementing
complex acceleration structures, similar to the ones used for ray tracing. Baking static SDFs to meshes
was also an option, but it would lose most of its charm.
Then came the idea of moving to 2D. Scaling down meant the project would be in a more realistic scope.
In 2D, I could easily adapt the rendering method to grow linearly.
As a side bonus, 2D physics are way less complex, and this allowed my little physics engine to run
thousands of objects easily.

How does it work?
WIP...