That’s an interesting question, and I’d break it down a bit further.
- Why C# specifically?
- Are we talking simple 2D stuff or full on “lets rewrite World of Warcraft” stuff?
- What topics to cover in different scenarios.
It’s also one I can’t speak with a lot of authority on; while I used to program in C# back in 2011-2014 and a little in 2020 before thinking better of it, the language has evolved a hell of a lot since I used it for writing Windows Presentation Foundation style apps in a mobile carrier’s call center (let the program write your Excel sheets for you kinda stuff), or experimenting with Unity.
You’ll see if you do any cursory Googling on the topic that there are endless discussion on what languages are “best” for game development. C# became the top language for game development mainly due to its connection with Unity and later Godot. And theres plenty of Youtube stuff on C#/Unity/Godot design and indie game developer devlogs.
But it’s not the only option available, and which language is the best is going to depend on the language ecosystem, your familiarity with low level development concepts, and what you’re trying to make. The most common choices other than C#: C++, Rust, Python and Lua are the ones I’ve seen the most.
Python actually has its own game development library pygame which is quite popular, and there is a video for Creating a Voxel engine from scratch in Python which unironically explains that “from scratch” means using 6 third party libraries. Myself I probably wouldn’t use Python because it’s interpreted (unless you compile with pyinstaller or something like that), but there’s been a lot of good and fast stuff written in it.
This kind of begs the question, what are the core foundational concepts in learning game development that are independent of language? I would answer OpenGL and its younger brother Vulkan, OpenXR, and advanced mathematics. Specifically in math you want to know matrix and vector algebra (for simple object transformations and positioning, ray casting, and pretty much everything else under the sun), linear algebra and a little of calculus foundational concepts wouldn’t hurt.
But I can’t emphasize Vulkan enough. Unless you plan on using a game engine like Unity or Godot (and even if you do), GPU based rendering concepts is a good thing to put in your toolbox that will help you to rise above the noob who just uses the default shaders rather than rolling your own.
Here’s a list of links I put together to round out my tutorial on customer renderers in Vulkan and Hotham a couple months ago. It’s just pasted directly from the Markdown so apologies for any formatting errors.
Books which develop skills in computer graphics
-
Pawel Lapinski’s Vulkan Cookbook is a recipe based book on Vulkan that nevertheless also provides coherent explanations for all of its recipes.
-
Marco Castorina and Gabriel Sassone created Mastering Graphics Programming with Vulkan, a book on creating a rendering engine from first principles using Vulkan.
-
Graham Sellers and John Kessenich created The Vulkan Programming Guide, the official guide to learning Vulkan
- Multiple authors including Tomas Akenine-Moller contributed to produce Real Time Rendering, the resource page linked above includes chapters on collision detection and ray tracing. They also provide a book recommendations page which includes a lot of free books such as Principles of Digital Image Synthesis, Immersive Linear Algebra, and more.
- *Richard S. Wright, Nicholas Haemel and others contributed to the OpenGL SuperBible, now in its sixth edition. This is the book on OpenGL, with principles that are relevant to Vulkan and GLSL shaders.
- Eric Lengyell produced Foundations of Game Engine Development, a four volume series dedicated to the algorithms and mathematical underpinnings of the craft.
Computer graphics: Transformations
Shaders and OpenGL
-
The Book of Shaders is a good site for information on programmatic fragment shaders.
-
Inigo Quilez has articles on numerous computer graphics related topics, also focusing on fragment shaders.
-
Learn OpenGL is a resource devoted to, as the name suggests, learning about OpenGL. Both OpenGL and Vulkan were
developed by Khronos Group and share a number of key similarities especially with respect to the use of shaders and the application of GPU
parallelism concepts to these programs which lie at the heart of real time rendering.
-
glslEditor is a project which lets you develop programmatic fragment shaders in real time, and
is available to use live at this website address
Vulkan Resources
- The original resource for learning Vulkan is the well known Vulkan tutorial, which focuses on drawing a single
triangle before moving on to slightly more advanced topics such as mipmaps, multisampling and depth buffering.
- Another good written tutorial is VulkanGuide, which has an excellent selection of tutorials and links to relevant
websites such as GPU open, different sets of Vulkan samples and more.
- Khronos Group’s Github Page lists all of the official Khronos repositories including the Vulkan Samples github. This includes multiple gigabytes of examples in different languages.
-
Vulkan Tutorial in Rust is the above Vulkan tutorial which has been converted to Rust and Ash. This is worth a look to see the coding techniques used and the API calls translated into design patterns that can be replicated in your own applications.
- The GPU Open website has a section dedicated to developing Vulkan applications. This includes blog posts, sample code, libraries and tools.
- The Vulkan Youtube channel has a variety of talks which help to shed light on difficult topics. Within the last year, this channel has also posted a video from Vulkanised 2023 with a list of developer resources. Other useful talks:
- Brendan Galea has a series of 31 videos on developing a game engine using Vulkan which covers the material of the Vulkan tutorial and more in a coherent, code-driven way. You can find his tutorial here
-
Voxelphile on Youtube has a number of videos on Vulkan in Rust, including:
-
Tantan’s videos on writing a Voxel engine in Rust are IMO the best videos I’ve seen on the topic, and I recommend keeping an eye on this channel for useful content. The author is using Bevy for their implementation, but the concepts are OpenGL/Vulkan related at their core.
-
Mike Bailey’s Vulkan page provides Vulkan material licensed under a CC4 ATT/NC/ND license. He also links to a very good summary of Vulkan’s structures called Vulkan in 30 minutes, available here