Skip to content

Conversation

@aveyrenc
Copy link

@aveyrenc aveyrenc commented Oct 2, 2025

I'm new to Zig and am welcome to suggestions on how to improve this PR.

With zig build run -Doptimize=ReleaseFast I get similar performance than on 0.14, but with the default (Debug) optimize I get less than half of the FPS. That's why I updated the README to use ReleaseFast.

Fixes #30

@aveyrenc aveyrenc force-pushed the zig-0.15 branch 3 times, most recently from a95840b to acbe7c6 Compare October 2, 2025 18:27
@ashugg
Copy link

ashugg commented Oct 21, 2025

Works for me on macOS 14.7.8 with zig 0.15.1

gh repo clone gh repo clone const-void/DOOM-fire-zig

cd DOOM-fire-zig

git checkout zig-0.15

gh pr checkout 31

zig build run

Code built and ran successfully

I assume the checkout to the zig-0.15 branch is necessary, as we don't want PR 31 to affect users with Zip 0.14

@hencomb
Copy link

hencomb commented Oct 26, 2025

Works for me on macOS 14.7.8 with zig 0.15.1

gh repo clone gh repo clone const-void/DOOM-fire-zig

cd DOOM-fire-zig

git checkout zig-0.15

Unfortunately this fails for me:

dyld[37837]: segment '__CONST_ZIG' vm address out of order in /Users/henry/Projects/DOOM-fire-zig/.zig-cache/o/33c225141b98d5becddbdfd80e8021f9/build dyld[37837]: segment '__CONST_ZIG' vm address out of order error: the following build command crashed: .zig-cache/o/33c225141b98d5becddbdfd80e8021f9/build /usr/local/Cellar/zig/0.15.1/bin/zig /usr/local/Cellar/zig/0.15.1/lib/zig /Users/henry/Projects/DOOM-fire-zig .zig-cache /Users/henry/.cache/zig --seed 0xd8d2a250 -Ze09a6b67631250b1 run

@aveyrenc
Copy link
Author

aveyrenc commented Nov 3, 2025

@hencomb After upgrading to macOS 26, I reproduce the problem. I already encountered it with Zig 0.13 so I don't think it's related to the OS version.

I think it's related to this issue and I modified the code to initialize the PRNG inside the only function that needs it. Alternatively we could allocate the PRNG on the heap to make sure it's not destroyed when the initRNG function goes out of scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants