HackerTrans
TopNewTrendsCommentsPastAskShowJobs

eliasdaler

no profile record

Submissions

I learned Vulkan and wrote a small game engine with it

edw.is
625 points·by eliasdaler·hace 2 años·260 comments

comments

eliasdaler
·hace 2 años·discuss
Thanks a lot! Good luck with your engine as well :)
eliasdaler
·hace 2 años·discuss
Glad you enjoyed it! :)
eliasdaler
·hace 2 años·discuss
> Not sure if I’ll be able to do their new guide, my laptop can’t run some of the more recent versions of Vulkan

If your laptop got still GPU driver updates in 2022 or later, it should probably support Vulkan 1.3. You can install Vulkan SDK (or just extract the archive) and check your Vulkan version by running the supplied "vulkaninfo" program.

For example, my 5 year old Thinkpad T490 fully supports Vulkan 1.3 and it only has an iGPU! :)
eliasdaler
·hace 2 años·discuss
You'll need 1k LOC to draw a single triangle and not 10-20k.

Sticking with OpenGL is understandable, but I can recommend learning some Vulkan as a side project (with the help of vkguide) without too much commitment. That's how I started and it turned out to be not as bad as I imagined! Uour mileage may vary, of course.
eliasdaler
·hace 2 años·discuss
I know about two games which do very interesting stuff with modern GPU capabilities:

* Noita

* Teardown

They both do their physics on GPU which results in some impressive effects and the level of destruction/world interaction which wasn't seen anywhere before.

Here's an interesting Teardown engine overview by its devs: https://www.youtube.com/watch?v=tZP7vQKqrl8
eliasdaler
·hace 2 años·discuss
Oh yeah, I enjoy his streams a lot :D

I can also recommend Arseny Kapoulkine YouTube channel[1]. It can get a bit too advanced at times, but his channel was one of my motivators of getting into Vulkan programming.

[1]: https://www.youtube.com/@zeuxcg
eliasdaler
·hace 2 años·discuss
By the way, here's an interesting post by Mike Blumenkrantz (Valve): https://www.supergoodcode.com/manifesto/

Most of it is satire, but it's interesting that the position of "Chair of OpenGL" still exists to this day and a new person was assigned to it in 2024.
eliasdaler
·hace 2 años·discuss
Thank you! :)
eliasdaler
·hace 2 años·discuss
I guess libraries like bgfx, sokol and The Forge are kinda like that. But I just feel like it’s either all or nothing if you’re already doing your own game engine.

I’m okay with using middleware/3rd party libraries for things which I don’t care too much about (e.g. physics), but graphics is such a core component that I want to handle it myself.

In a way, OpenGL drivers were such middleware libraries written for you by GPU vendors (or open source community). But now they stopped doing that and now you’re either writing your own graphics abstraction layer or using someone else’s.

In this case, I choose the hard way. And it seemed to have worked out so far. I definitely won’t recommend it to everyone (especially if they want to make a game in less than a year!), but as a learning experience it was fun.
eliasdaler
·hace 2 años·discuss
Yeah. Even though it might seem I’m 100% enjoying Vulkan, I still wish there was something closer to OpenGL and which was supported by GPU manufacturers. Other 3d party graphics frameworks are not bad, but you don’t feel the same confidence in their future in the same way as you did about OpenGL.
eliasdaler
·hace 2 años·discuss
Thanks! :D
eliasdaler
·hace 2 años·discuss
vkguide is a great way to get a feel of modern Vulkan. Maybe it’ll be still to complex for you - then it’s okay to say on OpenGL or learn some WebGPU.

I started learning Vulkan as an experiment and it seemed to work out well, so that’s why I wrote this article. :)
eliasdaler
·hace 2 años·discuss
Thanks a lot, that’s a very touching comment.

I try to make my website to feel like “the old Internet” that we seem to be losing and it's great that it’s noticeable. :)
eliasdaler
·hace 2 años·discuss
I can somewhat agree… I don’t dislike/fear Vulkan now, but I feel like there should have been something in-between OpenGL and Vulkan, because in most cases you don’t need the same level control over the GPU which AAA game require. Thankfully, libraries like VMA and vk-bootstrap + new extensions like dynamic rendering make Vulkan start to resemble what “OpenGL Next” could have been. It’s still not perfect, but I’m glad that things have moved into that direction.
eliasdaler
·hace 2 años·discuss
Agreed. I don’t even need all these fancy Vulkan features most of the time… Just validation layers and RenderDoc debugging make the whole experience of doing graphics programming so much more pleasant for me, compared to what I had to deal with in OpenGL.
eliasdaler
·hace 2 años·discuss
I agree. I should probably clarify that in the article. It’s much easier to write “throwaway” code when you’re working alone and when you’re doing it just for fun. This advice was probably aimed at people who tend to overthink things in these kinds of situations and spend years implementing things in the “right” way, which tends to slow them down considerably instead.
eliasdaler
·hace 2 años·discuss
Indeed. vk-bootstrap is a bit better with 600 lines of code, though: https://github.com/charles-lunarg/vk-bootstrap/blob/main/exa...

Vulkan initialization and basic swapchain management is very verbose, but things get much better after you do it for the first time and make some handy abstractions around pipeline creation/management later.
eliasdaler
·hace 2 años·discuss
Indeed. I used as little CSS as I could because I love minimalist websites. And the lack of syntax highlighting was inspired by Go blog, for example. :)

Raw HTML definitely looks much uglier, sadly (“Reader mode” in most browsers makes websites without CSS easily readable, though!).
eliasdaler
·hace 2 años·discuss
Thank you! Also, everything explained in the article is pretty much here: https://github.com/eliasdaler/edbr
eliasdaler
·hace 2 años·discuss
Thank you. The up-front complexity is still there and it might take quite a few days to see your first triangle. But I promise, everything will get much easier from that point. :)