Full disclosure: I am working with Valve under contract on an ongoing technical writing project, including, but not limited to, this blog post. I am neither an official employee nor a representative/spokesperson for Valve, and any opinions or personal views expressed herein are my own.
Back at Steam Dev Days 2016, Valve graciously invited me to share the stage in explaining the Steam Controller to developers:
<iframe title="Embedded content" src="//www.youtube.com/embed/7I4SiAiKqqk?enablejsapi=1&origin=https%3A%2F%2Fwww.gamedeveloper.com" height="100%" width="100%" data-testid="iframe" loading="lazy" scrolling="auto" class="optanon-category-C0004 ot-vscat-C0004 " data-gtm-yt-inspected-91172384_163="true" id="328051381" data-gtm-yt-inspected-91172384_165="true" data-gtm-yt-inspected-113="true"></iframe>That talk was pretty general and big-picture, so I would like to follow it up with some more practical tips derived from my own experience adding native Steam Controller support to my own game, Defender's Quest: Valley of the Forgotten, and explain some of the many benefits you can get from doing the same.
One hesitation some people might have for adding native Steam Controller support is -- why go to all that work just to support one device, and a kind of weird one at that? Isn't it enough to just support XInput and be done with it? And what if the game is mouse/keyboard centric? Won't it be a pain to adapt it for controllers?
Today I seek to to answer all those questions and more.
The Input Revolution
The biggest news is that the Steam Controller initiative isn't just about one physical device any more.
When you hear the word, "Steam Controller", this probably comes to mind:
But did you know all of these are now "Steam Controllers"?
As of January 19th, the latest version of the Steam Client enables full Steam Controller Configurator support for not only the Valve Steam Controller, but also the Sony Dualshock 4, as well as all XInput devices, such as the XBox 360, XBox One, and XBox One Elite controllers, not to mention generic models manufactured by Logitech, et al.
Furthermore, there is already (experimental) support for rigging up DInput devices -- just look, I even managed to get this third-party Wiimote driver working* with the software!
*Just a proof of concept, your mileage may vary.
When you add native support for the Steam Controller API, you automatically get every supported device, a list that already comprises 95% of popular gaming input devices and will continue to grow over time.
And let's not forget these trusty stand-bys, which are also supported by the configurator:
(in the sense that you can assign mouse & keyboard inputs to devices supported by the Steam Controller, though not the other way around at the moment).
The configurator not only lets you use any supported device with just about any Steam game, it also gives players unprecedented control over how they control their games. There's no better example than this heart-warming reddit post from a disabled PC gamer:
But there's a lot to unpack here. What's this "Configurator" I just mentioned? Let's back up for a second and clarify what we're talking about.
Terminology
These are the terms I'll use throughout this document, for clarity's sake:
Valve Steam Controller (VSC) -- the specific physical input device designed and manufactured by Valve commonly called the "Steam Controller." (You know, this thing).
Steam Controller Configurator (SCC) -- the software built into the Steam Client that allows for re-mapping input and controls in a bajillion different ways
Steam Controller API (SCAPI) -- the application programming interface that a developer uses to communicate directly with the controller in order to achieve "native Steam Controller support." This API is part of the Steam SDK.
Steam Controller Device (SCD) -- any physical input device that can be used natively with the Steam Controller Configurator. As of this writing, this includes the Valve Steam Controller, the Dualshock 4, and every XInput device, but not the Mouse & Keyboard.
XInput Device (XID) -- any input device that communicates using the XInput standard. In practice this is an XBox 360 or XBox One gamepad, or one of the many generic clones/knock-offs thereof.
Dualshock 4 (DS4) -- the standard controller that comes with the Playstation 4, designed and manufactured by Sony.
Redefining Input
It's a gargantuan task to try to add direct support in your game for every single input device out there in a consistent, stable, and flexible way. The closest you can get right now is SDL, which I highly recommend for bringing a strong dose of sanity to conventional input, but the SCC takes things one step further.
Aside: my (personal!) hope is that the Steam Controller initiative will eventually become a new universal -- and open -- standard for PC gaming input. I'm definitely not speaking for Valve on this particular point as I have no idea what their long term plans are.
As I mentioned in my talk, the SCC is built on a few "big ideas:"
The game should respond to actions, not inputs
The user should choose their controls, not the game
Input hardware should be more like software
The Steam Controller API is built around "actions." Mario jumps in response to a "jump" action from the API; the game has no knowledge of the "A" button. The player controls what means "jump" - it could be "A", "X", flicking a joystick upwards, whatever. The developer can (and should) upload a default configuration for the game, but the player can change it to whatever they want.
But it's more than just customization -- the player also gets features like turbo right out of the box. Even better, as new controllers become supported, more input methods become available without games having to add special support for them. For instance, if Valve were to somehow add support for original Nintendo Famicom controllers, the player could presumably trigger any in-game action by breathing into the microphone.
Here's my point. The Dualshock 4 features a gyro, but a common lament is that most PS4 games don't take advantage of it.
Why not? Probably because they'd have to add specific code to support it, and the XBox One doesn't have the same feature. Plus, design inertia keeps developers from sticking their neck out. This is a serious oversight, because twin analog sticks just don't have enough precision to match the fine-tuned aiming we're used to on PC.
But throw in gyro assist, and you can get pretty dang close. There's no better example of this than the new DOOM game:
<iframe title="Embedded content" src="//www.youtube.com/embed/3BEDKHEQ7ZY?enablejsapi=1&origin=https%3A%2F%2Fwww.gamedeveloper.com" height="100%" width="100%" data-testid="iframe" loading="lazy" scrolling="auto" data-gtm-yt-inspected-91172384_163="true" id="548048053" class="optanon-category-C0004 ot-vscat-C0004 " data-gtm-yt-inspected-91172384_165="true" data-gtm-yt-inspected-113="true"></iframe>
Although DOOM doesn't use the native Steam Controller API, the Configurator is powerful enough to do some fun tricks in what's called "legacy mode," a backwards-compatibility fallback for games relying on conventional input.
In this screenshot you can see that each physical input on the DS4 controller is simulating some other device input -- in this case a mixture of conventional gamepad and mouse inputs. The right stick is bound to "Joystick Mouse" which means the game will receive low-level mouse movement inputs from it,