Android version in combi with joypad

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
onkelarie
Posts: 4
Joined: Thu Jul 07, 2016 6:32 pm

Android version in combi with joypad

Post by onkelarie » Wed Jul 13, 2016 8:01 pm

I was filled with joy to discover an android distribution of Rocks'n'diamonds. Since I own an android settop box for my TV, which works perfectly with a wired Xbox 360 controller, I installed the APK and booted it up.
However, I am not able to set the A, B, X or Y button for the action button, it only supports swipe / touch settings. Did anyone get it to work with a joypad or are there plans to add support for configurable controllers in Android?

Thanks in advance!

User avatar
Holger
Site Admin
Posts: 2656
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Android version in combi with joypad

Post by Holger » Thu Jul 14, 2016 6:48 am

This is a very good point, because (a) I think that the current touch screen controls (either virtual joystick or swipe controls) really suck for games that need precise controls like R'n'D, and (b) I do not own physical game control devices for Android, so I cannot test such things by myself.

A possibly solution that you might want to give a try is the app "GamePad", which is a free download from the Google Play Store. As far as I can see, it can be used to map game pad input to keyboard input. But I haven't tried it for myself yet.

Besides that, I'm a bit surprised that it does not work with a game controller, as R'n'D itself supports joystick input. But I think I have to check this again, as SDL2 handles things differently in this regard. Does some of these A, B, X and Y buttons work as a first and second joystick button by default, or is this something that has to be configured individually inside each game? Unfortunately I do not have any experience with game consoles and the corresponding game controllers, but only with classic joysticks (well, USB joysticks and game pads connected to a standard PC).

I'll have a look at game controller handling in SDL2 again, maybe this problem can easily be solved.

onkelarie
Posts: 4
Joined: Thu Jul 07, 2016 6:32 pm

Re: Android version in combi with joypad

Post by onkelarie » Thu Jul 14, 2016 6:55 am

Thanks for the response!:)

I can run around using the Xbox Controller, and use the SELECT button to escape back to the menu's. It's really only the action buttons (pick up left/right/up/down and drop bombs) which aren't configurable. So out of the box it's nearly fully supported in that regard:)

Excellent hint on the gamepad app, I'll certainly check it out!'

onkelarie
Posts: 4
Joined: Thu Jul 07, 2016 6:32 pm

Re: Android version in combi with joypad

Post by onkelarie » Fri Jul 22, 2016 1:19 pm

Up until now I had no success with a keyboard catch app to simulate keypresses from a controller on android.

I checked out the git repo and noticed in the src/events.c the void HandleJoystick. Might it be possible that the 360 controller (or any console like modern controller) has more constants to choose from? I'm totally unfamiliar with SDL for that matter ;)

User avatar
Holger
Site Admin
Posts: 2656
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Android version in combi with joypad

Post by Holger » Sat Dec 10, 2016 3:12 pm

I still have to check this with current SDL2 game controller code, which might be only partially supported by the R'n'D joystick support code.

Is there any (easy) way to test this with Android tablets or phones? Maybe some cheap game controllers that can be used with Android devices to test such things? Or even game controller apps (like "GamePad") that use the same API or map to virtual keyboard keys? I've no experience in this regard by myself, but I have the suspicion that this maybe could easily be fixed...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests