When it comes to Linux game development and porting, Ryan “icculus” Gordon is The Guy.
Since the 1990s, Gordon has ported dozens of games to Linux, from Quake 3 Arena to Dear Esther, making him one of the foremost experts in Linux game development. His expertise in Linux games also led to a gig porting Humble Bundle games to Linux, helping developers build goodwill with users of the open-source OS.
With Valve Software’s biggest Linux push yet in SteamOS and Steam Machines, Gamasutra asked Gordon in an email Q&A what the future holds for Linux game development.
You’ve done a lot of Linux ports! What’s so appealing about Linux, and what got you started with porting?
I worked for a company called Loki, which did Linux ports of triple-A games. It was a model that seemed feasible on the Mac, where a few different companies were already doing this sort of thing. I had been an exclusive Linux user for a few years at that point, because I fit the profile in 1999: a young student that was bored, curious, and flat broke. [smile]
When I got the offer to do Linux work on games like Quake 3 Arena, Heroes of Might and Magic, etc. I would have been a damned fool to turn that job down.
After Loki, I made a very long distance cold-call to Croatia to ask about doing a Linux port of Serious Sam, and it sort of spiraled out of control from there.
Can you explain what you think is the main draw about games and Linux? [Valve founder Gabe] Newell has given some of his thoughts as to why — maybe your thoughts align, maybe not. As a developer, why is it attractive; as a player, why is it attractive?
I’m not a flag-waving Free Software fanatic, but I do think that Linux shows what happens when we all decide to work together and build something beautiful, instead of going off into our corners and building lesser things to fight other people building competing lesser things.
I don’t really care that IBM or Google or whomever contributed code because it converts into better profits for them. Good for them, their specific motives don’t matter. Some company gets a boost, and so do some gamers, and so does some classroom in a developing country. How can you not like that?
As a developer, I’m free to do whatever I want: if I hit a bug in the system, it’s not a mysterious black box to me. I can debug it myself, I can fix it myself, I can move forward without waiting for an indifferent corporation to clean up their mess.
I can decide to replace any piece of the infrastructure with a better idea, as long as I’m willing to put in the time.
If the ideology isn’t interesting to you, I can put it more simply: it’s a giant, largely underserved audience. There’s money out there waiting for quality games, and the market isn’t flooded with cheap product like it is on Windows or the iOS App Store. You don’t have to build something as popular as Angry Birds to get noticed, or something as tasteless as Candy Crush Saga to be successful.
As a player, why is it attractive? I see two reasons: first, if you’re on a desktop Linux system, you can’t ever get trapped in a paradigm shift like, say, what happened when moving from Windows 7 to Windows 8. More or less, you are empowered—even as a user and not a programmer—to have the system you want to have.
Second: everything I said about what makes Linux nice for developers trickles down. You’re seeing this now, as we’re in the process of replacing X11 with newer tech, which will give a better desktop experience, etc.
With the SteamOS announcement, there will probably be a lot of devs looking for people like you to do ports. What kind of expertise is needed to work with Linux, and what are some of the most challenging aspects of it?
It’s probably best to think of it as a cross between console and PC development. Some of it is special-case knowledge, the way one might know the details of the PlayStation 3 SPU, but all of it is much more open: you work on any old computer you like, you download the tools for free, and all the information—documentation, technique, conversation and debate—are all one Google search away. There aren’t NDAs [non-disclosure agreements]. To become a developer, you just decide to do it.
Developing for Linux used to be much harder. Now we have better tools (like the newly-shipped SDL 2.0.0) to make game porting (and game development) much easier, and we’re probably benefiting from the success of iOS here, too; finding people that know how OpenGL works, or even a generic Unix system works, is much easier than it used to be.
My experience has been that porting a game from Windows to Linux might take months, but porting a game from Mac OS X to Linux might take days. It’s anecdotal, but it seems to often be the case. The existing Mac and iOS developers might find Linux to be pretty welcoming in that regard.
For you personally, do you expect to gain more porting business with Steam’s announcements?
Oh yes. Definitely. But really, this ramped up as soon as the Steam Client for Linux was announced, and it never really slowed down.
I just saw that Nvidia has been working with Valve on SteamOS. How might help with Linux development?
You would not believe the amount of engineering that went into improving video drivers (not just from Nvidia) for Valve’s initial Steam launch on Linux.
Naturally, it’ll help…Nvidia’s drivers were already top-notch on Linux—discounting the different bits of glue for wgl and glX, my understanding is that it’s literally the same driver source code across Windows and Linux, if that gives you a frame of reference—and making them better is just icing on the cake as far as I’m concerned. I’ll gladly take those wins.
That being said, I don’t think that is the most important thing about that blog post. The unspoken message is this: there’s some opportunity here, whatever it might turn out to be, and instead of someone in a back room inking a deal to be This Console Generation’s Video Chip, GPU vendors are apparently going to compete to be the best thing for the Steam Box. This means that not only Steam Box users benefit, but all Linux gamers as well. I’m pretty happy about this.
Why is Mac to Linux an easier port than from Windows?
The hardest part is almost always dealing with Direct3D code. Starting from a Mac port, you know you already have a working OpenGL renderer, so a lot of heavy lifting is done.
A lot of the lower level APIs tend to be POSIX calls that map directly to Linux, and if you’re lucky, the Mac port already used SDL, which cleans up just about anything else.
What will it take for Linux to become a more viable platform for players and game developers?
You’re seeing it happen right now. I think three major events in the past year have really accelerated this proposition:
- Humble Bundle keeps proving that Linux users exist and will throw hard-earned money down for games.
- Unity3D made it possible to target Linux pretty trivially, even for developers that don’t know much (or anything) about Linux, so really interesting games are showing up without much engineering overhead.
- Valve shipped a Steam Linux client, and games are slowing trickling in…and that trickle has been accelerating. It’ll be interesting to see what happens now with SteamOS.
The short answer: it takes money and games, and both are flowing in now.
Anything else you’d like to add that would be informative for our game dev audience?
If you’re thinking of shipping a Linux version, it’s time to start evaluating the middleware you use in your game, and demanding your vendors support Linux, or give you source code so you can get it running yourself (in practice, both approaches are pretty common).
Definitely use SDL 2.0 [https://libsdl.org/]. Reach for it like you would reach for DirectX on Windows. It’s the defacto standard for low-level game APIs on Linux, but you might find (like Valve did) that it’s worth using it on Windows too, so you end up with one codebase that works everywhere instead of a Linux backend, a Windows backend, etc.