Inside RetroEngine, the Custom Engine Behind The King's Surveyor
Alexander Rybak talked to us about RetroEngine, the custom engine behind the upcoming dungeon crawler The King's Surveyor, and how he approached retro rendering without a graphics background.
Could you tell our readers a little about yourself and your journey into game development? How did you develop your technical skills? What projects have you contributed to?
I'm Alex Rybak. I make games as Analog Dream Dev, which is a company of one, and The King's Surveyor is the first thing I have made that is mine, from the first line of the engine to the last prop in the level.
I was born in 1989, and gaming was a big part of my childhood. I have a fondness for the systems I grew up learning and playing on my family PC. A dated but loved Sega Genesis and Nintendo Entertainment System filled countless hours after school. SimCity 2000, Daggerfall, Civilization, Sonic the Hedgehog, Joust. I still own a working Windows 95 PC and every old console I ever had, and I still play them, only now with my kids. That matters for what follows, because the whole engine began with one of those consoles plugged into an old television.
The 1998 Sharp, thirty-five dollars and a sore back, with the consoles under it.
My route into the industry was not direct. I spent four years in the Army as a satellite engineer, then went to Full Sail for a bachelor's in game art and a master's in game design. Since 2016, I have worked as a 3D artist and then a technical artist across three kinds of work that rarely meet: military training simulators, virtual reality for an airline, and strategy games at a AAA studio.
The technical side came from impatience and necessity. I would hand a model off, someone else would wire it into the engine and make it move, and I felt cut out of the moment when it came alive. Other times, at smaller companies with lean teams, there was simply nobody to hand the work off to. So I learned the next layer down. Visual scripting at first, then C# (Unity), then C++ (mostly inside Unreal), over close to a decade of production work. A technical artist's job is to live at the seam between the picture and the machinery, and every broken thing in a pipeline eventually lands on that desk. This is the nexus, and a good place to be to at least have a high-level understanding of how all the disciplines of game development come together to make a final product.
Before this project, I shipped two small games on Steam with a development partner, The Quantum Conflict and Cozy Holes. Those taught me a lot about what it takes to ship a project, from conception to Steam release. All the moving parts and disciplines, and how they interact. They did not, however, teach me what it is like to own the whole stack. That started on 31 October 2025.
What exactly is RetroEngine, and what made you decide to start working on it? What makes it stand out from other custom game engines?
RetroEngine is a game engine I wrote from scratch in C++ on Direct3D 12. It is built to do one thing: produce the kind of image an old game made on an old display, with the whole pipeline bent toward that from the first frame. It is not a general engine with a retro filter on the end. The display model is the reason the engine exists, and everything upstream of it- the renderer, the lighting, the palette handling, the UI- was built knowing what the last pass would do to the picture.
Everything in the runtime is my own code. The renderer, the animation system, the audio mixer, the save system, the scripted sequence system, the weather, the world editor. The only third-party code in the whole thing is Dear ImGui, which is MIT-licensed and lives in the editor UI, not the game. I used it because it saved me a couple of months. That ownership matters in a very boring way. I am never waiting on someone else's engine upgrade, and nobody can change the tool under me. If I hit a bug, I can stay up that night, drink a bunch of coffee, and fix it. But if I hit a bug, I’m the one who has to figure it out and fix it. The single-owner angle is both a strength and a weakness.
The editor with a level open. It is the game with a UI docked on top.
The King's Surveyor running in RetroEngine
Why start one at all: in September 2025 I bought a 1998 Sharp CRT television from an older gentleman for thirty-five dollars. It cost me more in back pain than money to get it home. I plugged in a SNES and the magic came back. The games looked nothing like the same games on an LCD. Motion was different. Bright objects were different. Edges were different. My kids got into it too, and watching them get pulled in by games thirty years older than they are told me this was not just my nostalgia talking.
It wasn't nostalgia. It wasn't placebo. It was physics.
The old display was finishing a picture that the old hardware had deliberately drawn for it, and modern screens show the raw draw without the finishing. For me, game development has always been an artistic expression first and foremost, and I look for things that resonate with the work on that level. This did. So I started studying what a CRT actually does, and what the people making games for them in the nineties had to contend with, and I started to experiment.
I want to be frank about where I started from. I have no graphics engineering background. I have a decade as a technical artist and a lot of time rubbing shoulders with people who do have that background, and some of it rubbed off, but no formal training. I had no intention of writing an engine. I thought I would get a couple of cool visuals out of it and call it a day. I had built CRT post-process effects before, scanlines and bloom and curvature, and I knew why they never convinced me: they sit on top of a finished frame. A real tube builds its image over time. Phosphors glow and decay; every frame carries a little of the one before; light scatters in the glass. The more I dug in, the more I realized I needed a level of control over the frame that an existing engine would fight me on every day. So on 31 October 2025 I opened a window, drew a triangle, and kept going. I never thought I would get it this far.
What makes it different from other custom engines is less any one feature than the shape of the constraints I chose to place on it. Most custom engines are general by ambition; they want to render anything. This one wants to render one kind of thing extremely well, and that single constraint decided every architecture choice. The frame is not independent of the last frame. The palette is a real limit, not a grade. The UI is drawn before the display pass, so text goes through the same glass as the world. The audio mixer has console profiles, so the game can sound like it is coming out of a specific old machine in the same way the picture looks like it is coming off a specific old tube. Materials are albedo only. No normal maps, no specular, no roughness, just color and a grayscale texture run through a color ramp. That is a huge limitation to hand an artist, and it is the point.
The projection is not fixed either. I reach into the projection matrix and bend it, so the hill and the tower on the horizon flatten and pull toward you like a matte painting in an old film. The trick is that the compression is projected onto a sphere around the player, so you can turn a full circle and nothing tears or slides at the edges, which is what killed every version of this I had seen attempted in a modern engine. Saturation and lighting fall off with distance too, so the far layer reads as a different layer. I call these two effects Spatial Compression and Dimensional Falloff. They are the kind of thing you fight a general engine to do, and this one was built around them.
The same walk with the depth effects on (left) and off (right). On, the tower and the hills pull in toward you.
Credits: the Mountain King typeface by Michael W. Moss, CC BY 4.0.
I want to be clear that I'm not knocking Unreal or Unity. I spent close to a decade in both, and they are straight-up beasts. They are multi-tools, and for nearly everyone, they are the right call. The flip side of a multi-tool is that it gives you ten ways to do anything and no direction about which one. RetroEngine is a Phillips screwdriver. I had a Phillips screw to turn.
Two practical things fall out of that. The engine and the editor are one executable, about six megabytes on disk. The editor is the game with a UI docked on top, same code, same pipeline, so what I see in the editor is exactly what the player sees, with no cooked-build surprises. And it holds sixty frames a second on a seven-year-old laptop with an integrated GPU, which was a goal from day one. Hardware is getting expensive. I wanted something small that runs on what people already own.
The other reason I started it is simpler. I wanted to understand every layer. Ten years in other people's engines leaves you fluent in the menus but somewhat vague about the machinery, and I didn't like that. A year of writing my own has been the best education of my career, and I've been doing it in public the whole way.
Please tell us more about how you simulate the actual behavior of a CRT display. How did you approach recreating that experience, and what were some of the biggest challenges?
First, a disclaimer: I'm not a graphics researcher by trade. I'm a technical artist who got obsessed with this and has been learning it in public, so if I get a term slightly wrong, that is on me. The approach was to understand the device before writing any code, and then to model the device rather than the look. A CRT is an electron beam scanning across a phosphor coating, behind a shadow mask or aperture grille, inside a curved glass envelope. Each of those four things does something specific to the image, and they happen in a specific order. The simulation does them in that order.
The beam. The scene renders into a high-dynamic-range buffer first, in linear light, the way the frame would exist as a signal. The display pass then treats that signal as the thing the beam is drawing. The beam has a shape, a scan line has a profile across its height, and bright signal spreads the beam slightly, which is why a bright object on a real tube looks fatter than a dark one. That bloom is in the beam model, not added afterward.
The phosphor. This was the part no post-process can do, and the reason the engine exists. A CRT screen does not light up and go dark in one frame. The beam excites the phosphor, the phosphor glows, and that glow takes time to dissipate, and it dissipates differently for red, green, and blue. I model the persistence per channel with two time constants, a fast one and a slow one mixed together, because real phosphor decay is not a single exponential. The persistence buffer carries from frame to frame, so what you see on screen in any instant is this frame's emission plus the decaying remainder of the ones before. That is where the trail behind a swinging torch comes from, and the way a bright flash hangs for a moment, and the slightly soft motion that people half-remember from old consoles and cannot put a name to. If you have ever seen me crank the persistence up in a demo until the camera leaves a mirror drag behind it, that is this buffer with the dial turned to eleven.
The camera whips past the fire. Every bright thing drags copies of itself behind it because the phosphor is still decaying.
The hard rule in that system is energy. Persistence should never add energy. It should only preserve what is already fading. That one sentence took me weeks to arrive at. Early versions added energy; a bright scene would slowly fog toward white, because the afterglow was being summed on top of the new frame instead of replacing what had decayed. The new emission and the decayed remainder are combined so the total can never exceed what the beam put in. I also gate the persistence by luminance, because near-black pixels that persist put a gray fog over dark scenes, and a dungeon game lives in dark scenes.
The mask. Between the beam and the viewer is a mask with a physical pitch, and the engine has several: an aperture grille like a Trinitron, a slot mask, a dot triad. The mask is applied at screen-pixel pitch, so it does not scale with the game's resolution. It belongs to the display, not the picture, exactly as on the real thing. The mask has a transmission value because a mask blocks light, and the beam has to be brighter to compensate, which is one of the reasons real CRTs are bright in a way LCDs are not.
A small area of the final frame enlarged six times, beside the mask alone for the same area.
The glass. Light scatters in the glass before it reaches you. That is halation, the soft glow around bright areas, and it is computed from the persistent emission, so it has the same temporal softness as everything else. Then there is geometry. A tube is curved, so the engine has barrel distortion with two radial terms, keystone, overscan, and a rounded tube border for the bezel. In front of the phosphor screen sits a separate front glass panel with its own slight lens curvature, and that glass is never perfectly uniform, so there is also a very small static waviness. Bright areas carry more beam energy and interact a hair differently with the optics, so the warp can be scaled very slightly by local luminance. Convergence error is modeled as well: the three beams do not land in exactly the same place toward the edges, so color fringes slightly at the corners. All of these are dials to control the look. For the game, I keep the tube geometry off by default and most of the other dials at or below the point where you would consciously notice them. The following images show the same spot with the tube off and on, so you can see what the dials do when turned up.
The tube geometry off, the look the game ships with today.
The same view with the tube on: curvature, bezel, convergence at the corners, and the glow past the edge.
Past the edge. A real tube in a dark room throws light onto the bezel and the wall. The engine has a glow region outside the tube boundary, fed only by the thin ring of image at the tube edge, blurred and color-corrected to match what's on screen. This one cost me more time than anything else so far.
The palette. Last in the chain, after all of the above, the image can be snapped to a palette. I say can, because the palette is a choice, not a requirement. The engine has about sixteen presets, from NES and Genesis through CGA, EGA and the mono phosphors, plus a custom table, and it runs fine with none at all. The King's Surveyor uses the Pico-8 sixteen with ordered dither, because of how its two greens behave under the phosphor model, and because sixteen colors give it the look that stuck with me, and that's what I chose for the game. The snap happens at the very end, on display-ready values, so the palette entries match what the tube would actually show.
One frame under five of the presets: no palette, Pico-8 (the game), NES, CGA in green, red and brown, EGA.
The same frame from the same camera: the scene color going into the display model, and the final frame coming out of it.
Five stages of one frame: the scene going in, the beam energy as a heat map, the energy through the mask, the persistence buffer, and the final frame. The two middle stages are in linear light, so they look dark on their own.
The engine's render passes wipe across a moving shot.
The challenges
The first was knowing when to stop. Every system in the engine has the same job description. It has to perform, because the game has to hold sixty frames on old hardware. It has to fit a constrained pipeline, so content is easy to make. It has to let me iterate fast, through procedural tools and modular, data-driven workflows, because I am one person and the content is most of the work. The display model was the hardest part, because correct and good turned out to be two different problems. A physically reasonable model produced an image that was accurate and that I did not want to look at. Months went into comparing the simulation with the real Sharp on my desk, on test patterns and then by feel on real games, and tuning toward something that is honest to the device and also beautiful. The trap, early on, was perfectionism. I could spend forever on one system, fiddling to get it a little better, nonstop, and never ship anything. I had to learn to let a system be. Get it working, trust the dials, move on, and only come back when something real warranted an expansion or a rework. That is also why repeatability mattered so much. I needed a set of knobs I could trust, so I could tune the display once and spend my time on content instead of re-tuning the tube every time a scene changed.
The second was the editor, and I underestimated it badly. I had spent a decade inside Unreal and Unity and taken every little panel for granted. An outliner, an inspector, a gizmo you can grab, undo and redo, a content browser with thumbnails, a terrain painter. Each of those looks like a small piece of UI, and each one is a pile of behind-the-scenes work. The gizmo needs picking and a transform model that holds up in every view. Undo means every edit has to be a command that knows how to reverse itself. Thumbnails mean rendering every asset off-screen and caching the result. The painter needs its own brush, its own rules for which chunk owns what, and a way to keep seams from showing where chunks meet. None of it is the game, and all of it is what lets me make the game. The one thing I got right was making the editor the game, with the UI docked on top, so every panel looks at the real thing. If I had known how much of the year the editor would take, I would still have built it. I would just have budgeted for it.
The third was the sheer volume of things to hold in your head at once. I spent years doing shader work and optimization in Unreal and Unity and was still blown away by how much those engines were quietly handling for me: resource states, not reading a buffer the GPU is still writing, batching, frame pacing. There are guardrails in a modern engine for a reason, and I broke the project more than once pushing past them. Source control saved me every time. Every stage in this display pass is a full-screen pass or part of one, and the persistence buffer is read and written every frame, so the display has to leave room for the game. The answer was mostly restraint: a small number of carefully sized intermediate buffers, no step that touches more pixels than it needs, and a debug view for every stage, so I can look at the beam energy, the mask, the emission, or the persistence in isolation instead of guessing from the final image.
Tell us a bit about The King's Surveyor. What is the game about, and what is the current progress? Now that you're developing a full game using RetroEngine, has the process revealed any weaknesses or limitations in the engine that you hadn't noticed before?
The King's Surveyor is a first-person exploration adventure in the tradition of King's Field and Ultima Underworld. You are Sebastian, the King's Surveyor, a careful man with a torch and a good eye, sent south to chart an ancient valley at the edge of the realm. Something very old reaches out of the dark on the way, and he wakes beyond the edge of every map he has ever drawn. The game is the long road home.
The spine of it is a surveyor's job. Reach the place, study carefully, record what you find, and come back knowing more than you left with. However, the location holds ancient secrets and a dark force unlike anything our hero is prepared for. There is no experience bar and no skill tree; you get better the way a surveyor does, by exploring and learning how to master the world around you. The torch is your light and your magic at once, and it burns down over time. You knock on old stone, and the passages behind it answer. The field journal fills in because of what you did, and the map around you fills in as you chart the land. There is a sword, and you will need it, but fighting is survival, not sport. Sebastian is not a battle-hardened warrior. He is simply a man with tenacity and a keen eye, who will stop at nothing to get home.
The knock: surveyors knock, and hollow stone answers.
The survey map fills in as you walk the ground.
The field journal, drawn in the surveyor's own hand.
Where it stands: the Steam page went public on 27 October 2026 and passed five thousand wishlists a week after going live, with no advertising, no demo, and no publisher. I have to be honest about how strange that is for me. I would post a trailer for my past games and three or four people would show up. I posted one still from this engine, and a thousand did, and they asked where to wishlist a game whose gameplay they had never seen. People connect with the look before they know anything else, and that taught me something about discoverability I didn't expect to learn. The engine is largely done for what this game needs. The game systems are playable. The game uses two-handed play where the left hand does the work and the right hand holds the light: the torch economy, climbing, movers, the knock, the journal, melee, the first enemies with real behavior. All set up and running. What remains is the content: most of the valley, the rest of the enemy roster, story delivery, a demo, and polish. In plain terms, the tools and the systems exist, and the bulk of the remaining work is building the world in them. No release date is announced, and I will not announce one until a demo is in players' hands and I’ve gotten feedback.
The dead in the valley still remember what they were.
Has building a full game revealed weaknesses in the engine? Yes, several, and they were all the same kind of lesson.
No skeletons. There are no skeletal meshes and no bones in this engine. Rigging and runtime animation control systems were too much for one person, so I played to my strengths: I author clips in Blender, bake them to vertex animation textures, and play them on the GPU. The CPU does not know where a foot or a hand is. That was fine until the game needed to know. Root motion when a skeleton steps into an attack, a torch gripped in a hand, a head that can see you. The fix was to bake a few named points out alongside the animation, sockets that the CPU can read back, and suddenly the GPU-only animation could carry a torch and push a player. Every one of those was a case of the toolset bending to cover my own shortcomings, which is the best thing about owning the tools.
Limits I set early and forgot. The descriptor heap for textures was sized for a tech demo. A real game loads level after level, each with hundreds of props, flipbooks, and baked animation textures, and a long session walks steadily toward that limit. The lesson was about ownership: an engine written for one scene at a time has to be taught that scenes come and go, and that what they allocated has to be handed back.
Readability under the glass. Text and UI drawn on top of the display pass look like a sticker on a television. Text drawn before it looks like it is on the screen, but it also gets the mask, the persistence, and the palette, and small text falls apart. The answer was to draw the UI into the frame before the display pass, on purpose, with a signed-distance-field text renderer so the glyphs stay clean through everything the tube does to them, and to design the UI at a size and contrast the tube can carry. The game's UI goes through the same glass as the world and looks like it belongs there, but that was not free.
And the one that still makes me laugh. In this engine, the player is the camera entity. The first time I wrote a capture tool that moved the camera along a path for a trailer shot, it moved the player; the enemies saw him, attacked, and he died on camera.
Do you see RetroEngine becoming an engine that other developers could use to create and release their own games? Has creating your own engine changed how you see games made with modern engines? And looking ahead, what are your plans for RetroEngine?
I'd love for that to happen, and I've said so since my first post. The game is how I validate the engine. I have put it through its paces myself, building a real game in it rather than demos, and I feel confident it is at a point where other devs could work in it soon. When The King's Surveyor ships, that will prove it can execute on the job from start to finish. But the engine's job right now is to ship that one game, and I want to be clear about why I'm not opening it up wider before then. The engine is fitted to this game the way a suit is fitted to a person. Its strength is that every system assumes the display model, the palette, the lighting rules, and the kind of world The King's Surveyor is. Turning it into something a lot of people could pick up today would mean generalizing the parts whose value is that they are not general, and doing the documentation, support, and stability work that a one-person project cannot carry while finishing a game. First impressions matter, and I don't want to put it in a lot of hands before it is ready. After the game ships, the display model in particular is something I can see standing on its own, and I would like a few other devs who feel the same itch to have it.
Has it changed how I see games made in modern engines? Yes, in two directions at once. I have far more respect for what Unreal and Unity do, because I now know what every one of their systems costs to build, and they have built hundreds of them. And I have less patience for games that look like the engine's defaults, because I now know how much a default is a decision somebody did not make. Those engines have gone hard after photorealism, and they are incredible at it, but if you want light to behave in a way that is not natural, you are fighting systems that are there for a good reason. I care much more about artistic intent than about realism. The games I grew up on did not have beautiful graphics. They had an abstracted layer forced on them by the hardware, and through it they still conveyed tone and atmosphere and feeling, because the limits made the artists creative. The old hardware chose your constraints for you. The constraints forced clarity, and the clarity gave those games an identity you could recognize from across a room. A tool that can do anything rarely tells you what it is for. I built a box on purpose.
The cherry tree under the light shaft.
The engine plans are the game plans. Finish the valley, finish the enemies, put a demo in players' hands, and ship The King's Surveyor on PC. Along the way, the engine gets whatever the game needs and nothing it does not. After that, the engine is paid for. The next game will come together a lot faster than the first, and I already have ideas. Then I can start sharing the engine more widely.
What I would like people to take from this is not that they should write their own engine. I have met devs who spent a year and a half on one and wished they had started in Unreal instead. The advice I would give is the one I gave myself: learn the existing engines first, so you know exactly what you are walking away from and why, and only do it if it is a long-term investment that will let you make the content you want faster over years, not months. I wasn't in a race, and I wasn't chasing a trend, so it made sense for me. The biggest hurdle for anyone coming from Unreal to this engine would be the limitation itself. There are no Blueprints. There is no material graph. Everything is right in front of you, and there is a lot less of it.
What I hope comes through instead is that the look of a game can be a physical fact rather than a filter, and that owning the pipeline all the way down to the glass is what makes that possible. For me, the CRT is the surface. Underneath, the engine fits what I want to make as an artist. It is unique, it resonates with me, and it lets me make the best art I am capable of. Every decision in it is an extension of myself and the work I want to do, and that feels wild. Artistic intent over realism is the whole goal. The picture on a real CRT was never a style. It was a device doing its job, and the magic was downstream of that. I wanted the magic back, and the only way for me to get it was to build the device.
Thanks for reading. If any of this gave you the same itch, come find me.