Steam for Linux is now available to all Steam users. With a growing catalog of Linux-supported games and an active Steam for Linux community group, it's a good time to port your game to Linux.
Developing a Linux game for Steam can be challenging for developers coming from a Windows or macOS development background. The following information will help you successfully port your game to Steam for Linux.
Building your game on Linux requires the following:
- A development machine running a fully-updated version of Linux. This can be a dual-boot machine, a dedicated Linux machine, or even a virtual machine running Linux. In addition, development is supported on both 32- and 64-bit Linux distributions. The recommended Linux distribution is the latest Ubuntu LTS release as they received the most testing by Valve and the linux community. Ubuntu can be installed from here.
- The Steam for Linux client.
- The basic Linux development tool set (e.g. g++, gcc, and a make utility); contained in the build-essential package. Install this package either by using Ubuntu Software Center or from an open terminal window with the apt-get command: sudo apt-get install build-essential.
- The latest version of the Steam Linux Runtime which includes the tools and a complete set of libraries required to ship Linux games on Steam. Instructions on how to use the runtime are included in the README.md contained within the repository.
If you have general Linux Steamworks questions or to report issues with the runtime, please join the Steamworks Development Group and post on the Linux Discussions .
There is a vast array of Linux development tools ranging from command-line interfaces to graphical developer IDEs. The following information is based on the experience of the Valve Linux team.
For those with Windows development tool experience, the easiest route to Linux development is Visual Studio on Windows and WinGDB
- a Visual C++ extension that allows debugging of remote Linux processes, using the Visual Studio debugging interface.
For development on Linux, the following tools were used by the Valve Linux team:
- QtCreator - a debugger and IDE with familiar Visual Studio key bindings.
- SlickEdit - provides a basic, configurable GUI with user-defined key bindings.
- gdb - a popular command-line debugger.
- cgdb - a wrapper of gdb that provides a split-screen view of the current location in source code during execution.
- Eclipse - another IDE that can be configured for Linux development. Available on Windows,
macOS, and Linux.
- vim - a basic command-line text editor.
The following debugging and tracing tools have been used by the Valve Linux team:
- QtCreator - see above.
- Symbol Servers
- AMD PerfStudio - a fully-featured, frame-based debugger with support
for API-tracing for games running on AMD graphics cards. Available on Windows.
- Telemetry - a fully-featured profiler for games running on graphics cards. Available on
Linux, Windows, and macOS.
- CodeXL - tools for debugging GL calls and their contextual state for
games running on AMD graphics cards
- gDEBugger - a debugger that debugs, profiles, and analyzes OpenGL code. Active development has shifted to
- perf - a command-line tool with various performance features. Available on Linux.
- NVIDIA Nsight - an extension for Visual Studio for debugging games running
on Nvidia graphics cards.
- lTTng - a Linux tracing tool
- apitrace project - a set of tools for tracing and replaying OpenGL and OpenGL ES calls from your game
- Zoom - a CPU profiler with a powerful and friendly user interface
is the prefered library for high-performance graphics rendering. It is the open equivalent to DirectX12 and Metal.OpenGL
was the older standard graphics rendering. A majority of games make direct calls to OpenGL but there are other games that use a translation method where legacy rendering code is translated into OpenGL calls. This is the approach used by older Valve Source games such as Team Fortress 2 and Counter-Strike: Source. If you choose OpenGL then we recommend using the core functionality in OpenGL 3.0 for your game.
Simple DirectMedia Layer (SDL) version 2.0 provides low-level access to audio and windowing, amongst many other things. Support for 3D rendering is provided using OpenGL. Installation instructions can be found here
. For more information and documentation, see the SDL wiki
. Valve uses this in Steam and most of our games to handle windowing and it provides the backend which powers the Steam Controller
For audio support, OpenAL
is an open source audio library (used by the Steam client) that supports multichannel positional audio. SDL supports audio with a callback API that works with PulseAudio, ALSA and OSS on the back end.
The following libraries provide support for other aspects of game development:
- FreeType - font rendering (both vector-based and bitmap fonts) on Linux
- Fontconfig - configuring and customizing font access
- FMOD Ex - an audio engine for Windows developers that are new to Linux development but have experience with FMOD
- Miles Sound System - a middleware sound engine for Linux development
- Bink Video - a video codec designed for game developers
- WebM - an open media file format; used for recording Team Fortress 2 video instead of QuickTime.
The following repositories are public and used for projects related to Steam for Linux: