Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal. You can also buy games using our partner links for GOG and Humble Store.
We do often include affiliate links to earn us some pennies. See more here.

Developer and game porter Ryan "Icculus" Gordon has created a new library named ControllerImage for game developers, with an aim to help showing on-screen controller prompts

Built on top of the popular SDL, specifically SDL 3, the idea is game developers would use this to show things like "Press *controller button* to open" type of prompts in-game. No matter what controller, it would be able to show the right prompt, as long as SDL knows what that controller is.

As written in the Patreon post:

Something that's been bothering me for awhile is how SDL handles game controllers: you plug in darn near anything, and it can figure out what to do with it, so the developer can assume the player is using an Xbox controller even if the actual gamepad is built by Sony or Nintendo. It can sort it out whether it's a first-party controller you paid 70 bucks for, or it's something totally anonymous, bought for a few yuan at a chinese street market.

But all SDL does is say "I know this controller, here's where its equivalent of the Xbox Y button is" to the programmer, and not "I know this controller, here's what it looks like" to the player.

I set out to change that.

This is a dirt-simple library that builds on SDL's ability to detect joysticks, to provide scalable images of its buttons and other features, so you can show users instructions that match the controller in their hand, even for controllers you've never heard of, and for screen resolutions that don't exist yet.

YouTube Thumbnail
YouTube videos require cookies, you must accept their cookies to view. View cookie preferences.
Accept Cookies & Show   Direct Link

The project is on GitHub. You can support Ryan "Icculus" Gordon on Patreon.

Article taken from GamingOnLinux.com.
19 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly.
See more from me
11 comments
Page: 1/2»
  Go to:

scaine Dec 4, 2023
View PC info
  • Contributing Editor
  • Mega Supporter
This guy is a national treasure. Now I guess I just need all my existing games to retro-adopt SDL and implement ControllerImage to get the proper playstation glyphs throughout! Reckon I might be waiting a while... but this is still music to my ears. I've been doing the internal mental gymnastics for so long!
fenglengshun Dec 4, 2023
Huh, would have expected this content to be on Phoronix, but gamedev news is nice.
Liam Dawe Dec 4, 2023
Quoting: fenglengshunHuh, would have expected this content to be on Phoronix, but gamedev news is nice.
I've regularly covered Game Dev news for years now, there's even a dedicated tag for it :)
Purple Library Guy Dec 4, 2023
What a clever idea.
enigmaxg2 Dec 5, 2023
Nice! I'm tired of most games showing Xbox prompts even if I use Playstation or Generic (1, 2, 3 ,4 instead of X/A B/O, etc) controllers.
fenglengshun Dec 5, 2023
Quoting: Liam DaweI've regularly covered Game Dev news for years now, there's even a dedicated tag for it :)
That's true. I guess this is just more low-level than I'd usually see, which is Godot, Blender, and the rest of the big giants so I didn't put it in the same mental category.
Nod Dec 5, 2023
Quoting: Purple Library GuyWhat a clever idea.

I subscribe to Icculus's youtube channel and watched his intro the other night. While watching I was thinking it seems like a really obvious idea? Why did it take until 2023 to try and show the player a glyf that corresponds to the input method they are using? Every time I get shown a glyf for an input method I'm not using (pretty common especially if you use a not xbox controller) I think the same thing.

Don't get me wrong, I really appreciate that Icculus has done this but I'm still surprised that it took so long for someone to do it. Is this a solved issue if you use steaminput?
AL2009man Dec 5, 2023
I'm surprised this hasn't been done much sooner.
fenglengshun Dec 5, 2023
Quoting: AL2009manI'm surprised this hasn't been done much sooner.
We kinda have this with steaminput, but this is more independent, and probably more adaptable to more game engines.
Marlock Dec 7, 2023
Valve should just hire Ryan to do his thing

Stupid simple highly relevant ("why wasn't this done before?!") lightweight crossplatform opensource libs for game development are his thing

I'm guessing game engines will be eager to add this feature (they all use SDL already afaik) so the right glyphs can be shown outside Steam too
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.

Buy Games
Buy games with our affiliate / partner links: