Memory Allocation - Part I

In this post we tackle the memory system implementation of Sempervirens. We spend quite some time reviewing the literature, as developing a full-fledged memory allocation system was pretty new to us. We finally set our mind on the approach presented by Stefan Reinalter on his development blog for the Molecule Engine. Stefan wrote an amazing series of posts on the memory system he came up with, as well as posts on various memory allocation strategies. His dev blog is an amazing resource that we cannot recommend enough to new developers!

Read More

Unit Testing

There is no standard unit testing framework in C++ yet, but many options available. At our stage of development, we want a simple internal framework that allows us to run unit tests in isolation, nothing fancy, really just a way to declare tests, and run over them all at once. As we are using CMake for our build system, we also want the system to integrate with CTest.

Read More

Runtime Concept Idiom

This post is about runtime polymorphism and, in particular, about what Sean Parent first described as the runtime concept idiom, that was designed to bring runtime polymorphism back to an implementation detail. Let’s consider a classic example to illustrate what is meant by that. Say we have a collection of objects (Circle, Square, etc) that we want to draw the shape of. The common way to tackle this is to perform type erasure via a Shape base class defining a draw method that all objects can override, by deriving from that base class.

Read More

Package Manager

Mathieu Ropert gave an excellent talk at ACCU 2019 about the state of package management in C++. He came up with a list of criteria to help select a package manager. Among the many candidates available, only Conan and Vcpkg made it through. The most relevant criteria to us is that the package manager be non-intrusive, i.e. the build system is totally independent of it.

Read More

Build System

There are several build system options one can choose from, but CMake clearly stands out in the cross-platform category, and is widely supported by library developers. It may not be the simplest/easiest build system to use, however its recent evolution (i.e. ‘modern’ features) definitely helps. CMake does also provide a few functionalities that could make it look like a legit package manager, but it really is not, and should not be used as such. The excellent book from Craig Scott on the subject, Professional CMake, A Practical Guide, is a very useful reference and user guide.

Read More

This is Our First Step…

We are thrilled to start this new adventure, and even more excited to share it with you on our blog!

Our first project is to develop Sempervirens, our in-house engine. We had originally thought of Sempervirens as a full-fledged game engine but are reducing the scope to the graphics part for now. We hope you will find some of the articles we post along the way interesting!

Read More