• Register

ScrumbleShip is the most accurate space combat simulation devised to date. Gather resources, construct a capital ship out of individual blocks, then pilot it with AI or human help against other players.

Report article RSS Feed Porting a cross platform game to Mac OSX

So there aren't very many games for OSX. Ever wonder why?

Posted by dirkson on Sep 6th, 2013

The Journey Begins

As an aspiring indie game developer, I believe strongly that my game should run on all the operating systems possible - Why limit myself to one operating system when there are happy, friendly people willing to buy my game on all three?

So when I was designing ScrumbleShip, I made sure to choose cross platform ways of doing things - Every library I chose worked on Linux, Windows, and OSX. This made running my game on windows and linux a breeze - No issues worth mentioning.

However, I immediately ran into a problem with OSX support - Namely, there didn't seem to be any easy ways to create a Mac program from other operating systems. So I'd need my own Mac - But with prices starting at $1000, a new Mac was about $967 above my meager indie budget. This kept me from really focusing on OSX support for the first year of ScrumbleShip.

Cross Platform? Not quite.

When I finally got my hands on a used machine, I ran into another problem - SDL, which created windows and handled input for me, couldn't jump through the hoops required to get a modern OpenGL window from OSX. (OpenGL is how you render cross platform 3D) So even though I could "run" ScrumbleShip on the Mac, I couldn't actually display anything on the screen.

Naturally, I had to replace SDL - "GLFW" seemed to be a better fit for my situation, and could make OSX hand me a modern OpenGL window. It took about a month of work to rip out the old SDL code and replace it with GLFW code.

Then I ran into a third problem.

One of these things is not like the other

The OSX version of OpenGL is a little different from the Linux and Windows versions. In Linux and Windows, you can mix older and newer OpenGL. So I used the new OpenGL when I needed power, and the old OpenGL when I needed something quick and simple. In short, all my 2D graphics used the older OpenGL.

You cannot mix old and new style OpenGL on OSX. It's one or the other.

First Mac-Compatible 2D rendering.

So over the next couple months I slowly replaced all my old-style rendering with the much more complex new-style rendering. This involved removing my cross-platform font rendering library, and basically re-writing a simplified version of it in modern OpenGL.

But at the end of all that, I had code I could import into XCode, compile, and run. ScrumbleShip had finally made it to the Mac!


Then my Mac broke. That one wasn't Apple's fault, but it has kept me from updating the Mac build. Thankfully my neighbor is a Mac-user and has graciously allowed me to borrow her computer, so I'll be able to hand out an OSX version again within the next few weeks.


Despite the lack of cross platform tools, some not-quite-cross platform libraries, some poor choices on Apple's part about how to support OpenGL on their platform, and failing hardware, I successfully got my game working on OSX. I can really understand why many developers wouldn't make this choice, however - The time I spent getting Mac support hasn't really justified the money coming in via Mac users.

But I still think it was the right thing to do. Each game coming out on OSX helps break down the barriers between the systems, and OSX users deserve cool voxel space games just as much as Linux and Windows users. Besides, there's least one good thing that came out of the porting effort - GLFW is smaller and easier than SDL for our purposes.


Post comment Comments
Guest Sep 7 2013, 9:35am says:

What about building a Hackintosh?
That's what i did in the end, now my pc duel boots Windows & MacOSX

+2 votes     reply to comment
dirkson Author
dirkson Sep 7 2013, 11:29am replied:

Well, there's a couple of problems with that.

The first is that this is some legally pretty murky water, and could get me in trouble. So as an indie developer, I have to avoid situations like that.

The second is that OSX *really* hates AMD cpus, which I happen to have.


+1 vote   reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Windows, Mac, Linux
Developer & Publisher
Orangehat Tech
Custom Built
Send Message
Official Page
Release Date
Released Oct 31, 2011
Game Watch
Track this game
Report Abuse
Report article
Related Games
ScrumbleShip Single & Multiplayer Futuristic Sim
Related Engines
Custom Built
Custom Built Commercial Released Sep 1, 2007
Related Groups
Indie Devs
Indie Devs Hobbies & Interests group with 1,164 members
Indie Gamers
Indie Gamers Hobbies & Interests group with 665 members
Orangehat Tech
Orangehat Tech Developer & Publisher