Live data from Hacker News

Zig gamedev project – left my job to build games in Zig lang

github.com

11–20 of 126 posts

Re: Zig gamedev project – left my job to build games in Zig lang

#12
post #3
post #2

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.

Why Zig?

Because zig needs better game development tooling!

Re: Zig gamedev project – left my job to build games in Zig lang

#13
post #3
post #2

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.

Why Zig?

Zig is like C but better. It fixes all the pain points of C without adding any extra complications (Rust - borrow checker, Go - GC, C++ - everything).

Re: Zig gamedev project – left my job to build games in Zig lang

#15
post #5
post #3

Earlier quoted context omitted.

Why Zig?

Why not Zig? Its a pretty fun language...

Well there are still quite a lot of compiler bugs. I personally have open issues going back as far as 2018. Knowing the compiler has bugs and that new ones are constantly being discovered makes debugging a pain because you have a lot less confidence that the problem is your code. I have many times blamed the compiler for my mistakes, something I've almost never done with C.

Re: Zig gamedev project – left my job to build games in Zig lang

#16
post #11

michal-z, how do you survive month to month having left your job?

I think most people in that situation would have saved up a lot of money so that they can support themselves properly during that period of time between jobs or between sources of income.

Re: Zig gamedev project – left my job to build games in Zig lang

#18
post #2

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.

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.

Re: Zig gamedev project – left my job to build games in Zig lang

#19
I 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 fix, and I was told the correct fix would be "quite hard" and "To fix some of the bugs you would need to rewrite quite a bit of code."

It sounds like a big milestone will be when Zig's stage1 compiler is self-hosting, written in Zig instead of in C++. I got the sense that the C++ code I was modifying is somewhat crufty, and the Zig version of it will be better designed in many ways (ie. https://github.com/ziglang/zig/issues/89#issuecomment-382110...), which will make fixing bugs like the one I encountered will be more tractable. I personally will be interested to revisit Zig when this migration occurs.

I also found that the language was changing from release to release in ways that made me update the code.

This is all totally reasonable for a language in development, and I mean no disrespect to the Zig devs -- it's an extremely interesting language. I only say this because stories I saw on HN gave me an impression that Zig was farther along than it is, at least in my experience.

Re: Zig gamedev project – left my job to build games in Zig lang

#20
post #3

Earlier quoted context omitted.

Why Zig?

Not OP, but here is what I can think of: - Low level - great C interop - Good toolchain ergonomics, except for no pkg manager yet - Great cross-compilation - Fast compilation (incremental coming soon) - Ideal for things where ownership rules can get complicated (ECS e.g.)

The C interop is especially useful for gamedev since so many libraries have a C interface and thus can be relatively easily used in Zig.
Post reply on HN