Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: More Mac Porting Work

In last week’s report, I mentioned being frustrated with CMake’s documentation as I tried to port Toy Factory Fixer to the Mac desktop.

I continued the work last week.

Sprint 64: Ports

Planned and Incomplete:

  • Create Mac port

Shortly after my last report, I actually got the game to run!

Well, it ran, but the screen was black. Using some strategic mouse clicks, I determined that the game was, in fact, working as I was able to maneuver through menus and quit the game, so the problem was that the game didn’t have any art assets to load.

I had to determine what was different between the iOS configuration and the Mac configuration to get my art and audio resources into the bundle. For instance, storyboards aren’t supported, so I didn’t need to worry about using them.

Toy Factory Fixer Mac Port

So eventually I got the graphics and sounds in the game, but I noticed that some sound effects and all the music was missing. It turned out that the custom-built SDL2_mixer didn’t know where to find libvorbis, so it didn’t have support for .ogg files. I would get an error along the lines of “Unrecognized audio format.”

So this sounds familiar! I ran into this when I created my Linux port, and the way to solve it was by installing libvorbis-dev using my distro’s package manager.

Well, I had homebrew installed on my Mac, but I couldn’t find libvorbis-dev as a package. Was I out of luck?

No, strangely, I just installed libvorbis, and everything worked. Go figure.

Then I needed to get the app icon set. On iOS, I provide the app icons in Images.xcassets/AppIcons.appiconset. Basically, there are a bunch of PNG files that correspond with the expected app icons needed.

After trying a few different things in my build configuration, I eventually figured out that inside AppIcons.appiconset I had a Contents.json that was specifying all of my icons as iphone or iPad icons. In Xcode, I could check a box that said I wanted Mac icons, and so I created a new Contents.json with only Mac icons specified, then created the icons in the dimensions at the Mac app icons expect.

Now it was at this point that I was trying to figure out why everything seemed fine AND the .app was only a few MBs.

Well, it turned out that the app has a dependency on my custom SDL2 libraries, and specifically where I built them (as opposed to where I placed them), and they are not getting bundled. So that’s the big thing that is left to do is to make the application standalone and not require third-party libraries to placed in arbitrary places.

And as I expect to put this .app on itch.io, I believe I don’t need to worry too much about certificates and signing unless I also want to distribute it on the App Store.

Assuming all goes well, I expect to have a Mac port finished soon.

Then I think it makes sense to port Toytles: Leaf Raking and finally, finally start work on my next Freshly Squeezed Entertainment game.

Thanks for reading!

Want to learn when I release updates to Toytles: Leaf Raking, Toy Factory Fixer, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and get the 19-page, full color PDF of the Toy Factory Fixer Player’s Guide for free!

One reply on “Freshly Squeezed Progress Report: More Mac Porting Work”

Comments are closed.