The guts of a game engine don't require any libraries at all. Using licensed offerings like havok for physics, etc., I don't think the language-specific part you might write (bindings, etc.) is a meaningful part of integrating the offering, and since they're licensed it's not as if you could just add them willy nilly in C++. You could argue that you'd want a language-specific library for some Steam SDK stuff, but AFAIK both Odin and Zig do have bindings for at least some important parts of these, and even if they didn't I don't think FFI is really that big of a problem in either language.
If you use Odin everything you need in order to create a game engine is shipped with it via the standard library (`math:linalg`, etc.) and vendor libraries (`vendor:{OpenGL,directx/direct3d11,directx/direct3d12,wgpu}`, etc.). If you really do want to use libraries `raylib` is also included, as well as SDL.
There's also a centralized effort to wrap C/C++ libraries into Zig packages so that they can be easily consumed in the Zig build system:
If you want Zig libraries that don't call any C/C++ code whatsoever, then you're going to have a hard time (as of 2025). There's not, e.g, something as mature and tested as glfw in pure Zig. There is work being done to make pure Zig libraries for gamedev however, see for example Mach: https://machengine.org/
If you're happy to use C libraries though (as I am), then things are generally fine. Many of the most popular gamedev C/C++ libraries have already had their build systems converted into Zig (e.g. Raylib) and so can easily be added to a project without having to do any work in the build system.
For C libraries that aren't already packaged, or if you want to maintain full control of the build yourself, packaging libraries with the Zig build system isn't too bad, but it's still a lot of work. (E.g. Ghostty maintains its own build files for its packages; as a result there is a lot of Ghostty build system code: https://github.com/ghostty-org/ghostty/tree/main/pkg )
Am I the only one who feels this is a step back from platforms such as Stack Overflow? Discord is basically just a chat platform, and while it's nice that there are always people there who are willing to answer the same questions over and over again, you can't rely on that staying the same in the future. Whereas SO crowdsourced a "canonical" answer to a question, and if someone came up with the same question later (and didn't find the existing answer via the search function or Google), they could be pointed to that answer.
But once we opened a Discord for our product we had so many more questions and users coming in. I do not like that it is locked up on a proprietary platform organised as a chat interface, but damn is it popular and often-used. Having users communicate with us more regularly is very motivating, and we've had so much more quality feedback by having it available
It is, unfortunately, where a lot of the people are and it makes your user base feel very "alive"
I have a long-held belief that the single best community information database format is Stack Overflow. (As opposed to wiki, chats, user groups/mailing lists, flat/threaded forums.) An editable top-level question, answered by several editable top level answers with different weighting on different things. (And then chat or small comments, there should be a place for some busywork that should carry no relevant information ideally.) Not necessary the website, but the format.
The second is blogosphere, allow users to write articles and engage in comments. For some reason basically no communities have these. They tend to have discord, and maybe a wiki.
IME chat attracts people who devote a lot of energy to the topic, including top contributors and power users. If you have questions about the latest features or obscure use cases there isn’t a better place to go.
Forum and wiki are great formats too, with different strengths. But if you are frustrated because you can’t seem to find help in those formats, head for the chat.
Some communities archive their chat. This seems like a great source of data to bootstrap a wiki or faq.
You wouldn't get a chat awash with these questions if they could be easily searched for.
2. On top of that you can make info on and solutions to other issues/problems actually available and accessible. Like the one the author describes later in the same text
Instead all this info is locked behind a proprietary chat platform
https://stackoverflow.com/questions/10181706/working-with-a-...
It's almost as fast as the Discord and much friendlier to searching and context.
I make a point of avoiding the Discord simply because I want my questions and answers to be searchable by people who come afterward.
I think this is likely due to the incentives SO creates. I have never actually answered a SO question because it feels like you need to answer perfectly or get torn apart. I will often contribute to a discord question even if I don't full know the answer just because I think I can add something useful.
On SO, at its peak, you got an answer even faster because it was public (i.e. the answer was already there, you just searched for your question).
So you're comparing minutes to instant.
> I have never actually answered a SO question because it feels like you need to answer perfectly or get torn apart.
IME, this is heavily dependent on the language and, therefore, the subcommunity. For example, for Clojure and R I've found the SO communities to typically be kind and positive, whereas I've found the JS folks there to be dismissive and aggressive, but YMMV.Zig Discord is also just semi-official... there is also Slack, there is also mailing list, libera IRC, Telegram, QQ, Zulip...
Is the Zig creator not there? I'm pretty sure he is.
Yes, Stack Overflow collated these questions and answers better but then at least you could google for something and get the answer, rather than asking again.
A LLM product that turns Discord transcripts into a browsable Q&A archive would be neat.
Over time I've seen plenty of comments like this one about platform A vs platform B and I find them all absolutely uninteresting. Having an active Discord server doesn't stop you from having active communities elsewhere.
Some people prefer Discord and they made a comfortable home for themselves. If you prefer a different platform (which could be a matter of personal preference or an objective advantage, it really doesn't matter which it is), then go make yourself a comfortable home there and start offering help to others on it.
If you're a newcomer and can't really offer much help, then you're asking for people who do have that knowledge to help you on a platform of your choice. That's certainly something you can wish for, but you can't demand it, regardless of how much objectively better your platform might be.
It actually does when users are pointed to discord to ask the same questions over and over.
Look at the two example questions in OP's quote. Sending users to discord for those means nearly nobody else will benefit from the answers.
And I think it's fair to point this out.
2. OP is not sending anybody anywhere, they're just talking about their experience. Zig has multiple communities and you can get help also elsewhere. A blog post that recounts one's experience doesn't need to list all other ways of getting help and it's wrong for you to assume otherwise.
IME discord's search is terrible. When I try to find previous questions it seems like it uses a naive exact word search, so if I change my keywords slightly it finds different results. I haven't tried Zig's channel so maybe they do it better. But in general, I stand by my comment.
> OP is not sending anybody anywhere, they're just talking about their experience
The quote was clearly recommending the Zig Discord channel as a place for anyone learning Zig to go and ask questions. This is "sending people there".
Discord is not a suitable platform for developers. I think Matrix is pretty good but, fuck it, I'll take IRC over Discord - it's still perfectly functional.
If anyone else has the same problem, they can't find it by just googling tho. So they need to ask the same question again which gets annoying pretty fast unfortunately
I wonder about the accuracy of the rest of the article.
A "comptime f32" is different from an "f32"
- Zig main source of QnA is a black box (Discord)? One that might be soon enshittified to hell because we have to satisfy the IPO.
- Zig uses Gradle style approach to Maven. Having used Gradle, I honestly can't recommend it. Too much freedom in build pipeline leads to too many footguns.
- Zig changes in big exciting ways, sounds like euphemism for breaking changes. Having those on framework level is tiring, having those on language level is hell.
The Discord is quite okay-ish for getting a quick answer for things you're blocked on. For proper discussions and deeper questions, Ziggit is a better choice (which is also a 'proper' forum):
> Zig uses Gradle style approach to Maven.
Zig's build system is conceptionally further away from both Gradle and Maven than Gradle is different from Maven (having to wrestle with both from time to time, my personal opinion is: both are a huge pile of excrement, unfit for real-world usage - even cmake is better than what the Java world accepts as build systems, and that's some achievement ;)
At least the Zig build system looks promising in the way that simple things are simple and complex things are possible, even though the API still sometimes doesn't quite know if it wants to be imperative or declarative. But the basic idea is that the Zig build system and package manager are "just" part of the regular stdlib and that your build process is a regular Zig program that gets compiled and then executed to perform the build.
> Zig changes in big exciting ways, sounds like euphemism for breaking changes
...which is completely expected of a pre-1.0 status. OTH, the last couple of versions were not worse than fixing new warnings after a minor C/C++ compiler update.
I fully agree, but I assume you want to ship your game (i.e. its a game not a toy). At least to Windows. Building your game on pre 1.0 language is like building a house on sand that's being transported by a truck.
2. I guess this is a matter of perspective. I don't have strong opinions on build systems but as someone who only occasionally dabbles in systems programming, I know that Zig's build system is infinitely more approachable and coherent than the monstrosities of CMake and any other build system I've ever come across in various C and C++ projects.
3. That's true, but Zig isn't 1.0 yet so that's to be expected.
Seems like you're also a C/C++ developer so I'm curious: how have you found zig's comptime compares to templates? (Personally I've found it a refreshingly simple experience, if occasionally annoying due to pre-1.0 bugs)
I still think the point stands though: zig's build system is nicer. Still bad IMHO as I despise build systems where you describe the build in the same language. Most of the time, it's much better to have a declarative rather than imperative build system. All in all, Ninja/Meson/Cargo/etc are much better in this regard.
(and yes, I think build.rs was a mistake, a necessary evil. Definitely not a feature)
One such example of "daily driving" is for gRPC, where the canonical way to generate the protobuf and gRPC bindings using Tonic+Prost is through build.rs. Another is C-to-Rust bindings, for all of those -sys crates.
Though I've also seen it used to circumvent limitations of Cargo, e.g. for invocations of dependent cargo build steps, etc. Overall, it's less common (or more robust?) than it used to be 5-ish years ago.
Feels like the startup code should actually verify that it's running on a suitable CPU rather than just crashing.
I don't think C/C++ or Rust do this either but they should!
let result = format!("{a}{b}{c}");
In Zig it's something like this: const allocator = std.heap.page_allocator;
const parts = [_][]const u8{"a", "b"};
const result = std.mem.concat(allocator, &parts[0], 2) catch @panic("allocation failure");
defer allocator.free(result);
I dunno if I want to write any really significant programs like that. At least not any that use strings a lot!For wanting to avoid fiddling with multiple repeated alloc/defer-free, it's often convenient to use the arena allocators that allow you to release everything with a single `defer arena.deinit()`
var buffer : [64] u8 = undefined;
const level_name_cstring : stringnt = std.fmt.bufPrintZ(&buffer, "{}. {s}", .{icon_index + 1, level_name}) catch unreachable;
(Make the string "10. Fortress" from the int 10 and "Fortress")The reason is, most of the strings in my game are bounded, and actually, known ahead of time. None of the levels have names that approach anything as long as 64 bytes, so I can actually do a fair bit of string manipulation on the stack before needing to use / save it to an allocator. (At least for now before localization XD)
So it depends on the use case. Sure, string manipulation in general can be tiresome in Zig, but in many cases it's also simple.
This sort of code makes me nervous about Zig.
Rust is still popular but it turns out the developer joy is pretty low.
Rust is one of the language I enjoy to use. The problem is you need to overcome its steep learning curve in order to enjoy it, which people tend to give up because it is too hard.
To be honest, I haven’t touched Rust in years, so it may have improved.
I recently started to re implement the (admittedly very basic) kernel in Zig and it’s been a breath of fresh air. The language seems much better suited for the level of abstraction that Osdev lives at. Major bonus is that all the existing C code is directly useable in a zig project without any wrapper nonsense or it can be easily translated.
I think I’ll stick with dig for a bit.
This is one glaring omission from Rust. Their SIMD integration is library specific and patchwork but improving.
Oh boy do I have the language for you.
Zambyte•11h ago
bgthompson•11h ago
thunkingdeep•5h ago