Oct 30, 2015


This week I’ve been looking at the Mac build (and to a lesser extent the Linux build). It took about 3 days work in total, but I’ve almost finished with the Mac build. I expect to be able to upload it early next week.

Some things I had to do to make that happen:

  • Fixed about 100 or so compiler errors, resulting from a difference in compilers between platforms
  • Built and added all the dependencies (Box2D, boost, SFML)
  • Added and tested the crash reporter (bugsplat) it all seems to work
  • Spent some time fixing little platform specific build bugs like rpaths, symlinks in frameworks, etc
  • Signed up for an Apple developer account so I could code-sign the app (otherwise you have to step through some hoops to get it running.)
  • Implemented a separate user data path *
  • Added ctrl+left-click to register as right-click for single button mice (on Mac only)
  • Fixed a renderer bug with glitchy lines between sub-chunks

Here’s a screenshot of the game running on my 2011 Mac Mini.

As mentioned above I also played around with a Linux build. This required yet another round of fixing compiler errors and building dependencies. One cool thing, which I’ve never really done before, is that it was all done within a virtual machine launched from within Windows. I used Virtual Box running Ubuntu. I spent about 8 hours getting the game to work. The screenshot below shows the game running from within that VM.

I’m hoping the visual glitches are due to the VM and not due to the game. If you’ve got a Linux machine, and are interested in testing out a very early build of Moonman, then please let me know.

Well it’s been a crazy week, in unfamiliar operating systems and IDEs, but I’m happy that those other builds are now coming together. Tomorrow I take some time off, go to PAX, and catch up with some other gamedevs.

* User data paths: Under Mac this means that the save games, log.txt, and settings are all stored at ~/Library/Application Support/moonman/092600, for example. In the next Windows update, the save data will be stored in Saved Games/moonman/092600 under the user directory. These are both the recommend OS paths for this kind of data.


I would like a Linux build. It would be beneficial to both of us, because I could give you feedback and I get to play it on our gaming computer.


Hey, what are the hardware and software specs?


I’ll get them tomorrow.


The Mac alpha is now available. Check out support for details on how to get.


Looking great!



Maybe this code won’t be useful at this point, but I also had to solve many cross-platform hurdles for Apanga and wrote an open source library called oswrap that can handle many common operations under a single interface - things like locating key directories, getting pixel data from image files, opening and playing audio files, etc.

On a mac, you generally save your app’s files in one non-obvious directory outside your app, and then use another best practice to find your own app’s (aka your bundle’s) path. This behavior is captured in the file__get_path and file__save_dir_for_app functions here. Another useful snippet is getting extremely high-resolution timestamps: the mac code for that is here.

There are more morsels in the rest of that repo.


Thanks Tyler, yeah I use SFML which covers most of that stuff and as of last week I’ve now got system-specific code for the save dirs etc., so it’s all good, but thanks anyway. :moonman_gradient: