How to write a template function that takes a class and executes type-dependent code on all its member variables, without requiring the class to specifically support it?
Since I bought Oculus Quest, I felt that it lacked a proper Doom-like action shooter. I created a scene in the editor based on what I envisioned, but it was absolutely impossible to run on Oculus Quest. This article describes various tricks I have used to bring it to Quest without too much sacrifice.
Vector can find elements in linear time, hashtable in constant time. That’s a pretty elementary part of computer science. However, better complexity does not always mean it’s faster.
It’s somewhat annoying that a factory needs to depend on all classes that inherit from the common interface. This issue can be avoided using a self-registering factory.
Serialisation into human readable formats tends to be a tedious task in programming languages without a lot of reflection. Here is a trick to make it far less repetitive in C++.