Urgent.News

What's breaking now, across hundreds of outlets.

Culture

I ported my Vulkan game engine to macOS in one day

In one day, a friend's MacBook allowed the author to port the game engine they wrote for their roguelike deckbuilder, Now You're Cooking!, to macOS. The engine was developed in Zig and used Vulkan for rendering, following the strategies outlined in "Fast, Flexible, and Simple Rendering in Vulkan." The game was functional from day one, and the author spent two additional days refining the build process to allow for future independent use.

Two weeks later, a user encountered a bug that the author addressed in a subsequent update. Deploying the game now only requires four steps, with the cross-compilation and uploading to Steam handled automatically by Zig. The article details how the author achieved this porting process and suggests that others can replicate the results in C/C++.

Vulkan is an open standard supported by various GPU vendors, but Apple does not support it natively. MoltenVK and KosmicKrisp provide translation layers for Vulkan on macOS, with MoltenVK being widely supported and KosmicKrisp requiring a more recent Mac. The author used MoltenVK in their port, but noted a precision issue with the unpack_unorm4x8_to_float translation on x86_64 Macs.

This was resolved by comparing integer values before unpacking. The author also points out the need for a minimum macOS version of 12.0.0 in the Info.plist, which can be created manually.

Rewritten by urgent.news; may contain errors — check the original.

Source: gamesbymason.com

Read the original at gamesbymason.com →

Report a problem with this story

More in Culture

More from Sunday, 29 November 2026 →