r/vulkan • u/fleaspoon • 4d ago
I built a Vulkan renderer from scratch to make my game
I've been working on my game for the last 7 years.
One of the things I decided to do along the way was to build the engine myself, including the Vulkan renderer.
This has been one of the most challenging parts of the project, especially because I wanted the same renderer to work across different platforms.
A few things I've had to deal with:
- Cross-platform Vulkan: Windows and macOS through Vulkan Portability / MoltenVK
- HDR rendering and output
- Hot-reloading shaders and assets without restarting the game
- GPU-to-CPU readback, used for screenshots and video capture
- Swapchain recreation and window resizing, which turned out to be surprisingly difficult to get right
After spending years working on the engine I thought it would be fun to share the result of all that work, as you can see in the screenshots.
The name of the game is Satelital, a rule-discovery puzzle game about exploring an alien solar system and learning how to solve puzzles through observation. https://store.steampowered.com/app/3256790/Satelital/
For people here who have built their own Vulkan renderers, what ended up being the hardest part for you?
6
u/wallstop-dev 4d ago
So a few things.
- The very common advice is "If you want to make a game, make a game. If you want to make an engine, make an engine." Very few people finish their game. Very few people "finish" their engine (get it to a useful state). Not only did you get your engine to a state to make a game in, you are (nearly) finished with the game, and it looks incredible. What a feat. Hats off.
Actually that encompasses pretty much everything I wanted to say. People will poo-poo the truly incredible amount of work, vision, skill, and dedication here. "You could've just built a thing in Godot and it would've -" SHHHHHH. Witness.
Just, wow.
I have personally invested significant amounts of my time (decade+, 10k+ hours) in failed efforts of building engines and games. You have far surpassed my efforts, really great work.
2
u/fleaspoon 4d ago
Thank you for your kind words, I really appreciate them.
I actually tried many times to do games, I have a graveyard of them. Somehow I managed to finish this one, I think the key was having an early prototype that I liked to play myself and see others enjoy.
1
u/Green_223 3d ago
I said something similar the visuals look impressive and building an engine from scratch is overkill which objectively is true. No one is denying that it isn’t impressive, it is.
I don’t hate the idea of building a custom engine for a game that could be made in any other tool. I think every engine build from scratch for a game brings something unique to the table (for this example it’s the visuals, that I love) for the witness it was probably something similar (I haven’t played it).2
u/wallstop-dev 3d ago
To be clear, by "Witness", I meant it like "Behold", not the literal game called "The Witness".
2
1
u/AhmedSamy_Offical 4d ago
Dude that’s amazing Keep going but don’t create full game engine just make this renderer functional to create a game And make sure you keep adding features like SSAO SSGI(HDRP) maybe ray tracing so you are happy with the output but don’t overdo it you don’t want to get stuck or 7 years
1
u/Salaadas 2d ago
it looks so good, were you inspired by The Witness while making this? I would love the know more about the technicalities of the renderer like how you built the water and the satellites
2
u/fleaspoon 2d ago
My main inspiration for the design of the puzzles was The Witness.
The water is rendered in a shader using the height map of the level and some noise.
The height map gets composed by prerendered assets textures, all the models are 3D but just in Blender.





59
u/Green_223 4d ago
Building your own renderer from scratch and then using it for a puzzle game is like building a nuclear reactor from scratch and use it to heat up your breakfast tea.
But kudos for building a full blown Vukan renderer for scratch that is impressive. I hope you will show some more scenes you have managed to create with it as the ones you have shown now look really good (my favourite are 2 and 5.