Declarative Functional APIs – A.K.A. Abusing Lambda Parameters

Functional APIs are a joy to work with. Not only do they help eliminate certain bug categories, but they tend to be very flexible and reusable. Today I present a technique that has emerged while I was simplifying some lambda based APIs. C++17 makes template meta-programming much more palatable, I dare not imagine what this would look like in C++11. Continue reading “Declarative Functional APIs – A.K.A. Abusing Lambda Parameters”

Simplifying Compile-Time Options With if constexpr

My latest little experiment relates to compile-time options and eliminating preprocessor checks in user code. I’m not a big fan of MACROs, especially when they are simply used to make compile-time branches. I am also not a fan of other techniques used to minimize this problem. With C++17, we now have a beautiful and simple tool that can help remove all these preprocessor checks, if constexpr.
Continue reading “Simplifying Compile-Time Options With if constexpr”

Contiguous all the things

Friendly Data-Oriented Entity-Component Managers

In the past months, I’ve rewritten the entity-component system of my engine pet project about three times. Finally, something that ticks all the boxes has emerged. Today, I’d like to present this architecture. So far it has worked wonders for me, though I wouldn’t guarantee this to scale up to AAA sized projects. I still have much testing to do.
Continue reading “Friendly Data-Oriented Entity-Component Managers”