2024-02-22

Project Dusk #2 - Scene graphs

I struggled a lot last week due to sickness and being unmotivated in general. One reason is that I am currently not seeing results of what I am doing. And the type system didn't come along so well as it isn't a trivial system. Working in empty space isn't something I enjoy either (good choice I didn't become an astronaut). So I decided to work on something that delivers visible results.

Initially I thought I would use an ECS approach over a hierarchy graph, but so far, I didn't find compelling enough arguments for an ECS. I looked into the pico_ecs header only library and it looks really good. Very similar to my style of working. But at the same time, there are some points that I don't like about ECS in general (yeah, never really worked with one seriously, so what do I know?).

So let's note down the pros and cons of both approaches:

That doesn't mean I am not taking inspiration here and there. I keep thinking that a component on a scene graph entity could be treated like a system with two components that are required: The component and the scene graph entity. The component's methods like the update and draw methods can be treated like an ECS system function callback. So that is the approach that I am exploring right now:

What I intend to do is to at least initially compare pico_ecs and my system to check what the implications are. Making web builds and testing those is also part of this.

🍪