Lots of good advice in this article. One that stuck out to me: Don’t implement something unless you need it right now This is a constant battle I fight with more junior programmers, who maybe have a few years of experience, but who are still getting there. They are often obsessed with "best-practices" and whatever fancy new tool is trending, but they have trouble starting with the problem they need to solve and focus…
> They are often obsessed with "best-practices" Tell them YAGNI is also a best practice :D
I learned Vulkan and wrote a small game engine with it
81–90 of 268 posts
Re: I learned Vulkan and wrote a small game engine with it
#82Earlier quoted context omitted.
Another good option is Direct3D 11. It’s IMO even easier to use than OpenGL but still allows to implement pretty good visuals, see GTA 5 or Baldur’s Gate 3.
Eh that's really only an option if you want to only ever target Microsoft platforms. Which is fine for some people, sure, but in a lot of situations, closing the door on Linux (Steam Deck), macOS, iOS, Android and the non-xbox consoles is a tough sell.
AFAIK the non-Xbox consoles either don't support OpenGL or we reportedly don't want to use their implementations.
Re: I learned Vulkan and wrote a small game engine with it
#83Its great to have more Vulkan resources but unfortunately this one too suffers from the same problem as every other resource I've found on getting something on the screen with Vulkan. They all introduce another layer of abstraction on top of Vulkan even before giving you the simple case without it. Its always use vk-bootstrap, volk, vma or someother library. Is there a single resource anywhere that gives an example o…
there's a common gamedev practice of allocating a big chunk of memory up front, and then using a bump allocator inside of it in most games, there are about 3 "lifetimes": - permanent/startup - per-level - per-frame and they're nested. so, you can use a single stack allocator for all of them. at the end of the frame/level, pop back to where it started there are more complicated patterns, but this one will get you pret…
Re: I learned Vulkan and wrote a small game engine with it
#84Great write up. Inspiring.
Re: I learned Vulkan and wrote a small game engine with it
#85Lots of good advice in this article. One that stuck out to me: Don’t implement something unless you need it right now This is a constant battle I fight with more junior programmers, who maybe have a few years of experience, but who are still getting there. They are often obsessed with "best-practices" and whatever fancy new tool is trending, but they have trouble starting with the problem they need to solve and focus…
Useful advice to start with. It’s a rule that experts are allowed to break though.
Re: I learned Vulkan and wrote a small game engine with it
#86Re: I learned Vulkan and wrote a small game engine with it
#87I think vulkan is great, but its only purpose is to take full advantage of advanced GPU features. It also leads to better performance when using advanced GPU features compared to OpenGL. Generally, I feel OpenGL is the recommended route if you don't really aim for advanced rendering techniques. There are plenty 2D /lowpoly/ps1-graphics games right now, and those don't need to use vulkan. Vulkan is an example of how t…
A middle ground is webgpu. It is much less verbose than Vulkan and is guaranteed to run anywhere, including the browser. At the same time, it has access to "modern" features like compute shaders which would not be available in webgl. It also doesn't have much legacy cruft leading to multiple ways of doing the same thing, unlike opengl. The main advantage is that it's new, so there are many fewer tutorials available f…
Re: I learned Vulkan and wrote a small game engine with it
#88Lots of good advice in this article. One that stuck out to me: Don’t implement something unless you need it right now This is a constant battle I fight with more junior programmers, who maybe have a few years of experience, but who are still getting there. They are often obsessed with "best-practices" and whatever fancy new tool is trending, but they have trouble starting with the problem they need to solve and focus…
I’ve observed/experienced the same exact thing [0]. I think it’s due to a combo of (1) not knowing what “the right way” to do things are and (2) thinking it’ll make your peers perceive you as more knowledgeable or advanced if they see you writing “best practices” code. Not to mention that sometimes the simpler solutions are so simple, they make you feel like you’re not a real software engineer. I usually just do my best to help them understand that simple solutions are okay, especially since (1) I’ve been there myself when I was in their shoes and (2) I know they have good intentions.
Re: I learned Vulkan and wrote a small game engine with it
#89Re: I learned Vulkan and wrote a small game engine with it
#90Earlier quoted context omitted.
Vulkan has advantages over OpenGL even if you don't care about visual fidelity. - No global state - You can select which GPU you want to use at runtime - OpenGL error handling is terrible - Validation layers!! - Cool official artwork - Fantastic documentation - You can upload data to the GPU asynchronously from a second thread in a sane way - Fancy GPU features - Mesh shaders, RTX
I will say that validation layers alone are worth it. Damn they are nice, so many bugs in my code has been found by them which saved a lot of time.