← Sat, Nov 21 digest

How I made a custom game engine for Satelital

read article ↗ hn thread ↗

A solo developer details a seven-year journey building a custom C++ and Vulkan game engine from scratch to ship the 2D puzzle game Satelital.

read it Provides a detailed post-mortem on building a custom C++ game engine from scratch, offering valuable technical lessons in rendering, shaders, and performance.

summary

A solo developer chronicles a seven-year project to build a custom C++ game engine and ship the rule-discovery game Satelital. Starting with SDL2 and OpenGL before migrating to Vulkan for HDR and cross-platform support, the author replaced the standard library and implemented custom ray-marching shaders to achieve a 3D look in a 2D top-down perspective. The post covers practical hurdles such as shader compilation optimizations on Intel GPUs, runtime puzzle editing, and handling hardware-specific bugs. Ultimately, the author emphasizes the deep technical freedom and satisfaction gained compared to using rigid commercial engines.

key points

  1. Migrated from OpenGL to Vulkan via MoltenVK to gain HDR support and future-proof the engine across Windows and macOS.
  2. Replaced the C++ standard library with a custom base library after profiling showed std::function and other STL components heavily bloated compile times.
  3. Achieved a 3D aesthetic in a 2D top-down game by rendering pre-baked asset height maps and implementing real-time ray-marching shaders for dynamic lighting and water interactions.

who should read it

Solo game developers and programmers interested in low-level graphics, C++ engine architecture, and rendering techniques.

discussion positive

consensus

Commenters debate the tradeoffs of building a custom engine versus using established tools like Godot, noting that seven years is common for polished solo projects regardless of engine choice.

pushback

One user questions why a 2D-looking game requires a GTX 1050 Ti minimum specification.

best comment by seba_dos1 ↗

> Seven years for example is a long time

Is it? I mean, it is fairly long, but it doesn't seem that uncommon for polished solo projects to take this much regardless of the used engine.

Writing a custom engine (or perhaps more accurately, writing a game with no preexisting engine) is easier than it may seem; orders of magnitude simpler than making a general purpose engine like Godot. It's particularly well-suited for solo projects, as the more people you add to the mix the more you benefit from sharing common tools that others could already be familiar with and the more time you need to …

Clarifies that writing a game-specific custom engine is vastly simpler than a general-purpose engine and often doesn't constitute the bulk of development time.

Generated by an LLM from the article and thread. Check the sources before relying on it.