Fable Engine banner

Fable Engine

6 devlogs
9h 1m 33s

A 3D Game Engine written from scratch in C with OpenGL, made with the goal of mimicking Unity as much as possible.

tathya is aweomse

Addressing my comment on the previous devlog:
I’ve switched my collision detection model from AABB to OBB (Oriented Bounding Box), which takes into account the rotation of the objects and, by extension, the rotation of the collider itself.

I was trying an approach where I was doing a ton of math to recreate the position of each of the points of the OBB individually, but that didn’t really work well with rotations, especially along the X-Axis (no idea what that was). So instead, I just used a model matrix and did some basic transformations on that, and it worked basically first try.

Attachment
0
tathya is aweomse

I’ve worked on collision detection and I’ve got box to box collision working a little, I need to test it out more but from the limited amount of testing I’ve done so far, it seems to be fine.
I ran in into an issue on the way where my cube would phase through the platform after sitting on it for a couple seconds, but turns out it was just because I wasn’t adding any impulse to counteract the velocity created by gravity.

Attachment
1

Comments

tathya is aweomse

Note to self: Collision with rotated objects doesn’t work because I’m using an AABB which completely ignores the rotation component of the object transforms.

tathya is aweomse

Added the basics of a physics engine with a force generator and a little bit of work on rigid bodies!

0
tathya is aweomse

I’ve added support for the “Preserve Specular Light” option, and the specular light now lights all faces of the object by default.

Attachment
0
tathya is aweomse

To summarize the work I’ve put in until now (more than 1h 31m, of course), I have:

  • Basic 3D shapes rendering
  • Core of an Entity-Component System (ECS)
  • Textures for 3D objects
  • Specular reflections with specular maps

I’m trying to recreate Unity as much as possible, starting with the rendering system. I think soon I’ll move on to scripting and then the UI. I still have a lot of things left in the component side so I might just work on that for a while, too. We’ll see. This is going to be a massive project so I’m not too worried about spending too much time on a certain element.

Attachment
1

Comments

tathya is aweomse

The next probably 5-10 (maybe even more) devlogs will be dedicated to completing the Materials ecosystem