8 posts tagged with "C++"

  • 14 Apr 2026/ C++

    C++20 Modules Don't Spark Joy

    C++20 came with a lot of new features, but among the biggest and most anticipated ones were modules. Now, almost six years later, the excitement has changed to healthy cynicism: Are We Modules Yet predicts that all libraries will support modules by 1st of May 2167, and every other week there is a Reddit post on "Well _are_ they usable by now?" (spoiler: The answer is no). My personal module journey began when I started the $$n$$th rewrite of my Voxel Game. Little did I know what I was in for.

  • 04 Apr 2023/ GameDev

    First steps with Vulkan

    As we've discussed in the previous article, our game engine is going to use the modern Vulkan graphics API. In this part of the Voxel Game Series, we're going to initialize the Vulkan Subsystem. These blog posts are going to follow vulkan-tutorial.com's structure for a good while. If you want to follow along with them as well, in this article we're going to get to Instance Creation. Base Code In this series, we're going to use shorthand notations for the (unsigned) integer types like . We d

  • 07 Feb 2023/ GameDev

    Rendering Overview

    One of the first tasks in our game engine will be to actually draw something on the screen. We call this process _rendering_. In this initial article we're going to take a look at the high-level architecture we're going to build. In the next articles in the series we're actually getting started building it. !A map of our rendering architecture. The moving parts of 3D rendering Let's start from the beginning. In this context, rendering is the process of converting 3D models into 2D images. Typi

  • 12 Jan 2023/ GameDev

    A Basic Logger

    In this part of the Voxel Game Series we're going to talk about logging. Logging is a vital part of any software project, and the same is true for a game engine. Logging allows you to quickly check the state of your systems, trace variables and more. A quick history of logging Logging exists as long as programming does[citation needed]. It just means to print some programmer-defined strings whenever a certain event happens: json { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg

  • 11 Jan 2023/ GameDev

    How to write a game engine from scratch

    In this article series we're going to write a small game engine for a voxel minecraft-esque game. We're going to use Vulkan, Khronos's successor to the cross-platform OpenGL APIs. These articles are meant to primarily target Microsoft Windows, I will point out platform-specific code, so that people on Linux should be able to follow along as well. A game engine is a complex piece of code and I'm not an expert in all areas. I will try my best to give you accurate information and to link to more re

  • 14 Jun 2022/ C++

    Doing syscalls by hand

    In this blog post we're going to take a stab at implementing syscalls by hand. There really is no advantage doing this, it's just fun to learn the intrinsics of Linux; we're going to discuss user- and kernel space and finally get our hands dirty with some assembly. This blog post is Linux centric, and exclusively deals with x64. I try to provide links for further information, but just be aware of that. What are syscalls? If you've ever written a program, chances are that you have already used s

  • 28 Mar 2022/ C++

    A utility class for multi-dimensional operator[]

    I'm always glad about feedback. If you spot an error in this post, let me know and I'll fix it. Sometimes you have data-structures that are multi-dimensional in nature. A classic example might be a matrix or a cube. Alas, there's no built-in way in the language to deal with multi dimensional array-like access. In this blog post we're going to develop a little utility class that you can use for exactly that. This article was written in a time before C++23. C++23 solves the problem described in th

  • 03 Oct 2021/ C++

    Using enum classes as bitmasks

    Edit 2024-06-03: Somebody on Twitter pointed out a mistake in the article. When I revisited the content, I relaized I've never actually ended up using this in my actual code. Instead, I usually just use a class, which I've shamelessly stolen from Vulkan.hpp. I'll keep this article up for archival purposes, but this content is probably outdated. --- I'm always glad about feedback. If you spot an error in this post, let me know and I'll fix it. This is just a quick tip on making es a little bit

All tags