Steam Deck input (SOLVED)

I know there’s not many of us here developing for Steam, but I am wondering if anyone is doing that and has a Steam Deck.

My game Fates of Ort fails to work with any of the Steam Deck input modes I have tested, and I don’t know why.

I made a small test utility that’s supposed to display input and such. Once I finally launched it on the Steam Deck it doesn’t do anything - no input or sys info captured/displayed.

I feel kind of stuck! Bit of a long shot, but - any thoughts?

2 Likes

Grasping at straws but maybe there’s something here? Steam Deck FAQ (Steamworks Documentation)

Unfortunately not many people have one of these to test. I ordered mine soon after the release and it is still months away from being shipped.

3 Likes

Yeah, I don’t have one either at the moment. Had to borrow from a friend. At first I naively only signed up for a devkit, but when I realised that’s not happening I made a reservation. So I’m far down the list.

Thanks for the link. Some interesting stuff there, but quite high level. From the user experience on the player side, it feels like it should just work.

Fates of Ort automatically switches over from mouse+keyboard to gamepad mode when any joystick movement is detected. That doesn’t happen, no matter which controls config I use. The little test program I made was designed to output what kind of input is captured, but it doesn’t display anything at all. So I’m stumped.

2 Likes

@Pkeod I saw you got a game working with the Steam deck. Did you have to do anything to get input working?

1 Like

Developing for Steam Deck without a Dev-Kit (Steamworks Documentation)

Getting your game ready for Steam Deck (Steamworks Documentation)

I have not tested on a Steam Deck so I can’t say. But we do make sure our games work on mobile, and we do the gamepad switching thing automatically as well with a virtual cursor controlled by gamepad input. If someone with a Steam Deck could try the game they could say what is working or not in our game and that might be helpful to you / I’ll share any configs we are using. Faerie Solitaire Remastered on Steam (If you need a key DM me.)

There is another possible solution I think that is using the Steamworks gamepad API directly.

1 Like

I’ve been doing some testing with the help of a Steam user, since I still don’t have a Steam Deck of my own.

The reason @Pkeod 's games are marked as playable is that they are based on mouse+keyboard. Steam Deck is able emulate this without issue.

For my game, I need the Steam Deck to function as a game pad. From my testing, I have been able to ascertain that Defold does detect raw gamepad input from the Steam Deck, but nothing more.

On Pkeod’s advice, I asked the user to visit https://gamepad-tester.com/ in order to identify the device id of the gamepad. This yielded “28de-11ff-Microsoft X-Box 360 pad 0”. This does look similar to another entry in the default gamepads file, but it’s strange to me that it identifies as a Microsoft device. In any case, adding this device id did not help.

Does anyone have any ideas on how to proceed from here?

I think I’d send the user a test app with Raw gamepad input and show all of the buttons. Like this:

From that you can create your own .gamepad binding entry. I did this to get gamepad bindings for iiRcade when releasing Trigger Dungeon on their platform. I don’t think I have that test app left (stupid, yeah, I know).

2 Likes

That seems a sensible approach, shame your app is dead :sweat_smile:

How do I get this info? If I pprint the raw action I just get things like:

{ --[[000001A85D444530]]
  pressed = false,
  released = false,
  repeated = false,
  dx = 0,
  dy = 0,
  screen_x = 474,
  screen_y = 134,
  screen_dx = 0,
  screen_dy = 0,
  y = 133.5,
  x = 474.5,
  gamepad = 0,
  value = 0
}

There should be one subtable for each input type: buttons, axis, hats.

Connect a gamepad of your own, map a raw binding and check the action table!

Hmm, but the above was a pprint of the action table for the raw input of my Xbox 360 controller?

That is strange. And the action_id was matching what you have in your input bindings for the Raw gamepad event?

Sorry for the delay. Yes:

function on_input(self, action_id, action)
	
	if action_id == hash("gamepad_raw") then
        pprint(action)
	end
end

image

DEBUG:SCRIPT: 
{ --[[00000207A88F7E60]]
  y = 628.5,
  dx = 0,
  x = 898.5,
  dy = 0,
  gamepad = 0,
  value = 0,
  pressed = false,
  released = false,
  repeated = false,
  screen_x = 898,
  screen_y = 629,
  screen_dx = 0,
  screen_dy = 0
}

Searching the entirety of the debug output doesn’t return “hats” for example.

Here’s the project:
Steamdeck_utility.zip (1.6 MB)

Have you tested this both locally on a computer with a connected gamepad and on the steam deck?

My last post is about me on my Windows machine with an old Xbox 360 controller.

Re: the Steam Deck, I know raw input is detected, but I haven’t gotten as far as trying to detect hats/axis etc.

I can’t really explain it then. The raw input should be cross platform. Please open a ticket on GH so that we can investigate further.

1 Like

Posted issue here:

I am launching a game on Steam soon and would love to have Steam Deck working, but I suspect it’s unlikely the issue will be resolved by then.

The first step is to make sure I haven’t messed something up in my repro. Can someone with a gamepad check if they are able to get detailed data for raw gamepad input (i.e. buttons, axis, hats)?

Perhaps, yes. I’m going to look into the raw gamepad issue next week though.

1 Like

Also, we’ve ordered a Steam Deck back in April and it is supposed to be delivered sometime in Oct-Dec…

1 Like

Great!

Mine is on the way! So if we resolve the raw gamepad issue then I can do some testing myself.

2 Likes