← Back to list

Game Engine Stories: Graphics Dilemma

Have you ever looked at game engines like Unity and Unreal, and wonder what it would take to build something similar? Now realistically…

Allen · 2024-04-08 20:29 · 101 claps · 2.7 min read
#engine-programming #graphics-programming #dx12 #vulkan #game-engine
Open on Medium ↗
Wiki topics: 💻 · Programming 🎮 · Gaming 🥊 · Combat Sports

Game Engine Stories: Graphics Dilemma

Have you ever looked at game engines like Unity and Unreal, and wonder what it would take to build something similar? Now realistically building something similar would be impossible for a single person, but that doesn’t mean something smaller tailor-made would be out of the question. This is one of the reasons I ventured on the journey of making my own Game Engine, to have the freedom to do things my way, rather than following the set rules of an existing engine. So this means I am doing it from scratch, the way I intend.

The first thing to go about is choosing which graphics API to use. While it seems very exciting to just include all three major APIs (OpenGL, Vulkan, and DirectX) from the get go, due to architectural differences, and the fact that I am not really an advanced graphics developer, means it’s better to start off with just one.

OpenGL seems to be the easiest option out of the bunch with me having a bit of experience from a previous university project on the raspberry pi. While it can be really easy to start off with, everything can get really cluttered with state machine approach, along with unnecessary driver overhead. I want as much performance as possible and that completely rules out OpenGL and this also allows me the ability to learn a lower-level API.

That leaves me with two options, Vulkan or DirectX. The thing to note with DirectX is that I have two options within the same category too, i.e., DX11 and DX12. DX11 is significantly easier to learn, but has some of the same pitfalls as OpenGL with significant driver overhead, so that is not an ideal option either. I could go with DX12, especially considering its tailor-made for Windows, and realistically I would most probably just target Windows anyways, so the cross-platform nature of Vulkan doesn’t seem as much of advantage apart from the vague possibility of maybe supporting Linux or MacOS down the line. So I had to do more research, to choose what I really wanted.

Looking at several posts of people asking for similar advice, and general differences, the main points to consider for either engine were:

  • Vulkan is more verbose but leads to more “cleaner” and consistent code.
  • Vulkan allows for multiple ways to implement a lot of stuff, while DX12 usually will only provide a single implementation for most things.
  • DX12 has most functionality packed into the core API while Vulkan mostly relies on extensions, which can mean an easier time with implementing certain stuff in DX12, but can also mean higher performance in Vulkan as unnecessary fluff doesn’t have to be used if not needed.
  • DX12 isn’t just a graphics API. It is a set of tools include networking, sound, input etc. This does mean I don’t have to worry about implementing my own functionality or using external tools.
  • Vulkan has significantly better documentation, along with extensive support communities and tutorials as compared to DX12, which has far worse documentation, along with a surprising lack of community.

Looking at the points put forth by developers who have worked with both API’s, I have decided to go forth with Vulkan mainly due to its significantly better documentation, and how the API is designed matches my style of coding, along with the fact that it is more flexible. Regardless of what I would have chosen, I would be starting from scratch, so I wouldn’t have any advantage in that regard.

From the next chapters, I am going to talk more about my actual development starting with 0 Vulkan experience prior to this project.


메타데이터
post_id
f1b59402c510
slug
game-engine-stories-magma-f1b59402c510
url
https://medium.com/@allenphilip78/game-engine-stories-magma-f1b59402c510
canonical_url
https://medium.com/@allenphilip78/game-engine-stories-magma-f1b59402c510
author_url
https://medium.com/@allenphilip78
status
ok
fetched_at
2026-07-24 02:27:15