I'm using Zig language full-time to create an indie game. Also, I've created zig-gamedev project to build game development ecosystem for this language. Using DirectX 12 for rendering, Bullet for physics. I'm ex-AAA game developer and graphics programmer.
Any plans for multi-platform in the future?
Zig gamedev project – left my job to build games in Zig lang
81–90 of 126 posts
Re: Zig gamedev project – left my job to build games in Zig lang
#82I think Zig is great and I'm following it with interest. But I think people should be aware that it is not really stable yet, at least in my experience from trying it earlier this year. I ran into a compiler crash: https://github.com/ziglang/zig/issues/7865 . I attempted to fix the compiler crash myself ( https://github.com/ziglang/zig/pull/8372 ), and I found a fix that worked, but apparently it was not the right fi…
As a counterpoint, we've written several thousand lines of code in Zig for a new financial accounting database called TigerBeetle [1], and all we've seen were two compiler bugs. The first was already fixed a few hours before we reported it, and the second was not a showstopper and something we could easily work around. On the other hand, because Zig has incredible velocity, we're also seeing that std lib contribution…
Re: Zig gamedev project – left my job to build games in Zig lang
#83As a former game developer, I don't get why the people start from scratch by developing their own rendering engines or even game engines. Using Unity, Unreal or even Godot is helping you to launch your game 100x faster. I know it might be fun to develop your own engine but it will take a lot of time and it still won't be as usable as an engine developed by 100x more engineers.
There are some great titles where the whole game was built around a unique feature provided by a custom engine. It probably wouldn't have been possible to do "Teardown" in Unity, for example; not without making some serious compromises, at least.
Re: Zig gamedev project – left my job to build games in Zig lang
#84Earlier quoted context omitted.
Contributions are another one I think. Both the authors and potential collaborators might find it more attractive to use their language of choice. Compilers also tend to pose a variety of challenges that force one to really dig into a language.
Yep. I know it's entirely other end of the language spectrum, but I think that's why Typescript got successful while Flow did not; Typescript is in Typescript, while Flow is in OCaml. And nobody knows OCaml. OTOH, eslint is making waves now and it's in golang, so. Who knows.
Re: Zig gamedev project – left my job to build games in Zig lang
#85Earlier quoted context omitted.
Congrats! Full time indie is a fun and scary adventure at the same time, good luck! One question, why DX 12? i'm kinda sad when i see indie choose proprietary non-portable tech.. Not to say that vulkan is better (i hate it), but i'm curious
If the OP is an ex-AAA graphics programmer, DX12 is probably more familiar than Vk. AAA likely means consoles which at the very least means you end up doing DX12x for Xbox, and at that point you may as well also do DX12 for PC.
Switch uses GL/Vulkan
And the PS4/5 uses something akin to Vulkan
On PC Vulkan is probably more used than DX12, i can't remember the time i seen DX12 in a setting.. i think i only seen it once..
Re: Zig gamedev project – left my job to build games in Zig lang
#86Earlier quoted context omitted.
If the OP is an ex-AAA graphics programmer, DX12 is probably more familiar than Vk. AAA likely means consoles which at the very least means you end up doing DX12x for Xbox, and at that point you may as well also do DX12 for PC.
Could be personal preference. I worked with OP at Intel during the early days of Vulkan and he was the go-to person for anything Vulkan related, so he's certainly familiar with the API.
We solved this issue already with WebGPU, it uses what ever is native to the platform you target..
https://devlog.hexops.com/2021/mach-engine-the-future-of-gra...
Everyone wins
Re: Zig gamedev project – left my job to build games in Zig lang
#87Earlier quoted context omitted.
I believe Zig takes a more nuanced and balanced approach to memory safety as a spectrum, rather than the extremes you present of either GC or borrow checker. For example, Zig offers spatial memory safety, and provides test allocators to catch temporal memory safety issues. That's already an order of magnitude improvement over C. Memory safety is also just one aspect of safety, whereas sometimes programmers conflate t…
Ada, Modula-2 and Object Pascal, minus compile time execution that they lack, and you have Zig almost 40 years ago. Sad that we have to go in circles to keep programming fashion going, instead of adopting best practices from the get go.
Re: Zig gamedev project – left my job to build games in Zig lang
#88As a former game developer, I don't get why the people start from scratch by developing their own rendering engines or even game engines. Using Unity, Unreal or even Godot is helping you to launch your game 100x faster. I know it might be fun to develop your own engine but it will take a lot of time and it still won't be as usable as an engine developed by 100x more engineers.
I know it might be fun to develop your own engine That's it right there. You can spent years pretending to write a game while optimizing your from-scratch engine for features that probably no-one will ever use [1]. But I think it depends on what your goal is. If it's a small hobby project, and you enjoy the process of writing your own engine (which, granted, can also be a great learning experience), then why not? You…
If you have some amount of self-discipline and implement your custom engine to be minimal and only tailored to your game (as many indie games have demonstrated), I don’t see how it can’t be done.
Re: Zig gamedev project – left my job to build games in Zig lang
#89Earlier quoted context omitted.
There are some great titles where the whole game was built around a unique feature provided by a custom engine. It probably wouldn't have been possible to do "Teardown" in Unity, for example; not without making some serious compromises, at least.
I'm curious why do you think it's not possible to make a game like "Teardown" using Unity.
Re: Zig gamedev project – left my job to build games in Zig lang
#90Earlier quoted context omitted.
Could be personal preference. I worked with OP at Intel during the early days of Vulkan and he was the go-to person for anything Vulkan related, so he's certainly familiar with the API.
Well, that is not a pragmatic approach to make games, specially for indies, to just target one graphics API, that limits the audience you can reach We solved this issue already with WebGPU, it uses what ever is native to the platform you target.. https://devlog.hexops.com/2021/mach-engine-the-future-of-gra... Everyone wins
Michal is a seasoned AAA dev who has worked at AMD, Frostbite, EA DICE, Intel - I'm sure he knows exactly what tradeoffs he's making.
Different folks have different goals, and that's OK. My goal with WebGPU is to aim for a future where we have truly cross-platform graphics. I suspect your goal is similar.
But I don't think it's wrong to aim for the present, to use an API you're familiar with, or to want to get as low-level as you can get. That's pretty admirable, honestly, and I'm happy people are doing that in the Zig ecosystem.
Heck, maybe one day Michal's work with DirectX here leads to a DirectX backend for a Zig WebGPU implementation. :)
Experimentation is good.