Wiring physical devices to abstract inputs

In an earlier post, we discussed different methods of gathering keyboard input in Windows. Today, we will cover how multi-platform and multi-device input can be handled in a straightforward way, showing a very efficient implementation of the underlying parts.

Continue reading →

Three months of blogging

After a bit more than three months of blogging, this blog has already managed to accumulate more than 3000 hits – thank you for reading, keep spreading the word!

Besides, I’ve recently been accepted as a writer for #altdevblogaday, so expect to see some technical articles there as well. My first blog post went live on Tuesday – I’m happy to be part of such a passionate community!

Generic, type-safe delegates and events in C++

While other languages such as C# offer type-safe callbacks/delegates out-of-the-box, C++ unfortunately does not offer such features. But delegates and events provide a nice way of “coupling” completely unrelated classes without having to write a lot of boilerplate code.

This blog post describes a generic, type-safe implementation of such delegates and events using advanced C++ features such as non-type template arguments and partial template specialization, supporting both free functions and member functions alike, without any restrictions or dynamic memory allocation.

Continue reading →

Properly handling keyboard input

Working with Windows, such a seemingly simple task such as handling keyboard input can turn into a small engineering nightmare. There is a myriad of deceitful APIs for basically doing the same thing, yet every single one of them has its own flaws. This post details how this was solved in Molecule – read on for a journey through Windows hell.

Continue reading →