Archive for June 16, 2023

Friday, June 16, 2023

Game Porting Toolkit

Christina Warren:

But buried in the keynote was a macOS feature that Apple should have called out with more fanfare: DirectX 12 support for macOS. As PC gamers already know, this software support means the floodgates are open for some real games — not that casual Apple Arcade stuff — on Mac. Maybe, just maybe, this is the beginning of the end to the old joke that Macs can’t play AAA games.

It turns out that Apple added DirectX 12 support via something it is calling the Game Porting Toolkit, a tool Apple is offering to developers to see how their existing x86 DirectX 12 games work on Macs powered by Apple silicon. That toolkit largely takes place as a 20,000 line of code patch to Wine, a compatibility layer designed to bring support for Windows games to platforms such as Linux, BSD, and macOS.


DirectX 12 support within the Game Porting Toolkit skips right over all of these translations. With zero need to modify any game code, games such as Grand Theft Auto V, Diablo IV, Cyberpunk 2077, and Hogwart’s Legacy can now run on Apple silicon Macs almost as if they’re native.

You see, Apple did talk about GPT at WWDC.

Dan Moren:

Gaming on the Mac has been a fraught experience for decades, and it’s certainly possible that this toolkit will follow in the footsteps of other failed appeals to the gaming market. But one significant difference is that all of this technology is here, now and already works. You can, as numerous YouTube videos prove, download and run a recent Windows title and have it play surprisingly well. Will this entice developers to the previously untapped Mac market? Unclear, of course, but you can’t say Apple hasn’t made it easy for them.

Thomas Clement:

I really don’t think the game porting toolkit is going to be the big deal that some people make it to be. It’s great that it exists and will help to port games but game developers and studios still need to care and want to invest in the Mac platform. There’s still a relatively big cost involved, this is not “Apple has implemented the DirectX API in macOS, ship your Windows game as-is” as some seem to believe.

Colin Cornaby:

GPT titles can’t be redistributed through the DX12 translator. And they can’t be distributed to any stores. No converted game is output.


The next step after GPT is “Now do a real Metal port.” It’s a demo piece - that’s it. There’s no output, there’s no starting point.

Steve Troughton-Smith:

Apple’s Game Porting Toolkit should be built into macOS, Proton-style, and Apple should provide a completely streamlined ‘just check a checkbox’ wrapping tool/SDK such that any Windows game developer can submit to the Mac App Store. If it’s good enough for iOS games, it should be good enough for Windows games.

Guy English:

If you’re chasing compatibility with another platform then you’re behind the play and you’ll never achieve comparable results. That’ll only serve to cement the Mac as a third rate platform. If a porting path is presented and, importantly, the games are met with market success, then the tide can start to shift.

Steve Troughton-Smith:

The Mac is 40 years old 😅 Apple has burned every bridge with game developers it can. You can no longer buy a Mac you can put a graphics card into. Apple’s not on speaking terms with the top game engine company of the era. What tide is going to turn? I want to live in that world.

See also: Bring your game to Mac.


Update (2023-06-19): Thomas Clement:

The advent of cloud gaming might very well finish killing off native Mac games. I’ve been testing GeForce NOW for a few days, this thing is insane, it just works. To the point where I even find myself playing Mac compatible games with it, better graphics and performance, 32-bit & intel support, no installations needed. For the first time I’m considering buying Windows-only games. But alas not all games are available so we still have a game availability problem.

Swift Proposal: Init Accessors


Swift applies definite initialization analysis to stored properties, stored local variables, and variables with property wrappers. Definite initialization ensures that memory is initialized on all paths before it is accessed. A common pattern in Swift code is to use one property as backing storage for one or more computed properties, and abstractions like property wrappers and attached macros help facilitate this pattern. Under this pattern, the backing storage is an implementation detail, and most code works with the computed property, including initializers.


The ad-hoc nature of property wrapper initializers mixed with an exact definite initialization pattern prevent property wrappers with additional arguments from being initialized out-of-line. Furthermore, property-wrapper-like macros cannot achieve the same initializer usability, because any backing storage variables added must be initialized directly instead of supporting initialization through computed properties. For example, the @Observable macro applies a property-wrapper-like transform that turns stored properties into computed properties backed by the observation APIs, but it provides no way to write an initializer using the original property names like the programmer expects[…]


This proposal adds init accessors to opt computed properties on types into definite initialization that subsumes initialization of a set of zero or more specified stored properties, which allows assigning to computed properties in the body of a type’s initializer[…]


Bike 1.12

Jesse Grosjean:

Bike Outliner adds inline navigation buttons so you can zoom through your outline with just your mouse. It also adds a navigation bar with back and forward history and breadcrumbs.


New inline navigation buttons are added after rows with children. Use them to zoom through your outline with just your mouse. They are a nice visual indicator of where you are and where you can go.

I don’t think I’ve seen an outliner that does focus/hoist this way before.


Find Any File 2.4

Thomas Tempelmann (tweet):

Scripted Rules allow for custom file matching with Lua or JavaScript code.


Rule File Content now looks inside zip files, including .docx (Word) and .xlsx (Excel) files.


The popup menu with the search locations includes a Recent Locations menu that lists folders you had previously chosen for a search.

If you hold down the command key when double clicking on items in the results, they’re not opened but revealed in Finder instead.

Searching for files by name in Finder hasn’t worked very well since Mac OS X Tiger, if not earlier. I mostly use EagleFiler for this, but for files that it isn’t managing I recently started using Find Any File instead of the find command, in many cases. It reminds me of Mac OS 8—pre-Sherlock—in a good way.

Find Any File Scripts:

This makes it possible to create very specific and complex search rules.


Later versions of FAF may add more scripting features, such as for displaying custom columns and more information about listed files and folders, and offering more commands in the contextual menu for found items.


Basically, you have to implement a function named match that takes one argument, and returns either true or false (returning nothing is fine, too, and is the same as returning false). The one argument is an object providing access to many properties of the to-be-checked item (i.e. either a file or a folder).

I like where this is going. Unfortunately, enabling the JavaScript debugger for testing doesn’t work with notarization, so you need to downoad a separate version of the app if you want to do that.

Update (2023-06-29): Pierre Igot:

Absolutely delighted to find that, in macOS Ventura, doing a file search in a specific folder in the Finder is working as well as ever.

I mean, who ever searches for files in a specific folder using key words that appear in their file names? In 2023?