Live data from Hacker News

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

github.com

71–80 of 126 posts

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

#71

As 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.

For me personally, as a hobbyist game dev, Unity and the like feel like I'm having to relearn how to do something I already know how to do if I just write code instead of relying on someone else's gigantic abstraction. And I also very much like the idea that I can make my small games super small and port them to literally anything without having to hope some third party adds support for it.

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

#72

I don't really get the "I Left My Job to write $FOO in $BAR language" reason. I can understand if someone left their job to write $FOO - you see an opportunity and you take a risk on it. What does the language have to do with it? To me, taking such a risk, and then adding further risk (using a language you weren't using daily) seems to be a recipe for disaster. If I were taking a risk (by leaving my job) on a new pro…

I think it's interesting, because product/market fit is really important, and you have one camp of guys saying that programming language is almost irrelevant. But then it isn't always the case, because choosing the right language constructs can make or break your software depending on the domain, and have a quicker time to market. I think the problem lies in a lack of scientific literature, and a collision of culture between result oriented business people, and geeky explorative tech people. I would love to find a way to bridge the gap of understanding, but to even approach this problem in a correct way seems difficult.

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

#73

How is zig compared to nim, where you can also disable safety(even disabling the gc)? To me nim seems more "ergonomic", but they both try to hit the same problem space.

Asking since I want to build a ray tracer and voxel engine in nim as a side project at some point. But I really like the approach of high level safety and optional low level performance from both languages. I was considering Rust, but I don't like having to deal with the borrow checker all the time.

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

#74

No actual games yet, just a few rendering tests. I suggest starting with something simple but actually playable, like a clone of Zero Wing.

If anyone thought this was an oddly specific remark (as I did), I looked it up. The 1989 Namco/Toaplan side-scrolling arcade shooter "Zero Wing" [1] is has two notable facts that make it a fun reference here:

1. It's the game from which the "all your base" meme comes.

2. The fighter craft that the player controls is called "the ZIG".

[1]: https://en.wikipedia.org/wiki/Zero_Wing

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

#75

Earlier quoted context omitted.

Part of Rust's problem last I knew was it throws a lot more than it necessarily has to at the LLVM backend. So a front end that takes the time to lessen the burden could run faster despite using the same tooling.

Part of it (perhaps the majority) is excessive intermediate code. But at least some of it is that Rust's abstractions are more complex/involved. The "zero cost" doesn't refer to compilation time.

Is that part paid in the Rust or LLVM portion of the compiler chain?

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

#76
post #74

No actual games yet, just a few rendering tests. I suggest starting with something simple but actually playable, like a clone of Zero Wing.

If anyone thought this was an oddly specific remark (as I did), I looked it up. The 1989 Namco/Toaplan side-scrolling arcade shooter "Zero Wing" [1] is has two notable facts that make it a fun reference here: 1. It's the game from which the "all your base" meme comes. 2. The fighter craft that the player controls is called "the ZIG". [1]: https://en.wikipedia.org/wiki/Zero_Wing

I cannot believe I had an opportunity to make an AYB reference in 2021 but here I am. The fact that nobody else had made one, or has made one, in reply to this post leaves me feeling old.

Move every ZIG; you know what you doing.

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

#77
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.

The tech looks really great. What kind of game (genre) are you planning to make?

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

#78

Earlier quoted context omitted.

Intersting, some follow up questions: - Fast compilation: isn't it llvm? So how faster compared to C++/Rust/others that use it? - Ownership rules/ECS: what about zig makes this especially good? The only language that comes to mind in this respect is Rust and its borrow checker, is it similar in Zig?

1. Both zig and rust compile to intermediate representations which are then compiled to llvm IR. Most of the compilation woes of rust are in the early stage IR. 2. Zig doesn't have ownership rules, which can get in the way of important data structures for gaming.

[deleted]

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

#79
post #47

Earlier quoted context omitted.

Memory safety is a pain point of C, and Zig doesn't fix that. There is no free lunch: you either accept garbage collection or deal with something that resembles the borrow checker.

From my point of view in terms of memory safety with Zig, we could just use Modula-2 or FreePascal/Delphi instead, but they aren't as fashionable.

As much as I love Delphi, the language syntax hasn't aged well. Single pass compilation was great to have in the 1980's but nowadays even the humblest Raspberry Pi will chew through thousand of lines of C++ and link an optimized executable within seconds.

We deserve and can afford a lot more comfort than Pascal (and siblings) provides. Incidentally, modern language ergonomics also adds much in the way of coding safety, making usage of explicit allocation control a more manageable problem than it was 30 years ago.

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

#80

Earlier quoted context omitted.

Part of it (perhaps the majority) is excessive intermediate code. But at least some of it is that Rust's abstractions are more complex/involved. The "zero cost" doesn't refer to compilation time.

Is that part paid in the Rust or LLVM portion of the compiler chain?

rust portion. For example, LLVM has no internal concept of ownership.
Post reply on HN