Inside RetroEngine: Building a Custom C++ Engine for Retro Visuals

Illustrative photo: Solo developer Alexander Rybak built RetroEngine in C++ to simulate CRT displays.

Solo developer Alexander Rybak has detailed the architecture of RetroEngine, a custom game engine built completely from scratch using C++ and Direct3D 12 to power his upcoming dungeon crawler, The King's Surveyor. According to interviews and accompanying development logs, the project originated from acquiring a vintage 1998 Sharp CRT television, prompting a deep technical dive into hardware-accurate retro rendering rather than relying on surface-level post-processing filters.

Simulating Physical CRT Mechanics

Unlike standard engines that apply scanline overlays or bloom as a final screen-space pass, RetroEngine models the physical mechanics of cathode-ray tube displays directly into the rendering pipeline. The engine processes an initial high-dynamic-range buffer to simulate the electron beam shape and intensity. According to source reports, phosphor persistence is calculated per color channel using dual time constants that preserve decaying light frames without artificially adding total scene energy. Additional environmental factors—such as physical aperture grilles, slot masks, glass halation, and barrel distortion—are integrated before optional final color palette mapping, such as the Pico-8 16-color preset used in The King's Surveyor.

Iterative Growth Through Public Development Logs

Development logs trace RetroEngine’s steady transition from a basic renderer into a comprehensive workspace over roughly 250 days. Early architectural hurdles, such as 4K texture memory exhaustion on streaming terrain chunks, forced the implementation of a global texture cache with deterministic key normalization. Subsequent updates introduced GPU vertex animation, Gerstner-wave water, procedural wind, and a deterministic time system enabling developers to pause, rewind, and replay simulations. Editor tooling evolved in parallel, incorporating viewport gizmos, chunk painting workflows, and visual navigation to streamline scene construction.

Why Building a Custom Stack Matters for Independent Developers

The decision to write a proprietary engine from scratch represents a stark divergence from dominant multi-tool frameworks like Unreal or Unity. While general-purpose engines offer vast flexibility, they often burden solo creators with unnecessary complexity, opaque pipelines, and dependency on external toolchain upgrades. By authoring every layer—from the audio mixer and save system to the integrated editor and Direct3D 12 renderer—Rybak maintains absolute control over performance and aesthetic constraints. This approach ensures that the entire runtime fits into a compact six-megabyte executable capable of sustaining a stable sixty frames per second on aging hardware with integrated graphics. For independent developers working within highly stylized genres, custom engines demonstrate that severe technical constraints can dictate cohesive artistic direction rather than acting as mere development bottlenecks. Furthermore, building in public over hundreds of days highlights both the steep learning curve and the profound educational value of mastering the entire software stack, proving that bespoke engineering remains a viable path for specialized indie projects.

Key takeaways include a compact six-megabyte executable, stable sixty frames per second, and absolute control over performance.

Hardware Performance and Architectural Constraints

Operating as a company of one under the moniker Analog Dream Dev, Rybak balanced the immense scope of building custom tooling with the practical necessity of shipping. The editor operates as a user interface docked directly on top of the game executable, eliminating discrepancies between development views and cooked builds. Material limitations—such as relying solely on albedo maps and grayscale textures run through color ramps—enforce strict artistic discipline while keeping computational overhead exceptionally low.

Cover: Marcin Wichary from San Francisco, U.S.A. · CC BY 2.0 · Wikimedia Commons. Layout and headline text by Signal Titans.

Source: Inside RetroEngine, the Custom Engine Behind The King's Surveyor · RetroEngine Dev Log

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *