The Dink Network

DinkHD Android Controller woes

July 10th 2018, 06:43 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I got a new controller for my phone (Flydigi Wee 2) in order to play games on the go psvita/switch style.

It works great on emulators and through their app testing button presses occur as they should, however with DinkHD that doesn't seem to be the case. Through testing this is what I've found

Flydigi Wee 2-in-1 controller 
(Buttons are xbox layout)

Left joystick - working as intended
Dpad - working as intended 
LB - Map (button6)
RB - Turbo Mode
LT - Nothing
RT - Nothing
Start - DinkHD menu... and keyboard..?
Sel - Inventory
X - Magic
A - Brings up keyboard
B - DinkHD Menu
Y - Inventory.. Then controls become wonky missing button presses for a bit


The z and c buttons as well as right joystick do nothing as I would expect.

As it stands DinkHD isn't playable with this controller by default due to not being able to attack or talk/examine without stretching for touch controls.

Bring in the Flydigi Gamepad Assistant app. It lets you emulate tapping the screen in certain places, swipes, and touch joysticks. This works.. but not good enough. Once you make a profile and map your touch controls to buttons, the rest of the buttons won't do anything. You cannot remap button presses alongside this. Also the button placement isn't visually represented correctly so it's a pain to fine-tune.

I've looked into a couple apps for remapping, some are pay and others require a root (no thanks)

I had hopes for playing DMODs like this but for now it's not going to work.
July 10th 2018, 09:14 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
I was looking into getting one of those; it would make playing Dink a whole lot more tolerable than touch controls.

I looked into the source, and I'm not sure what's going on.

Here, Seth's binding the keys; the third parameter is what's in the platform-specific code, and the fourth parameter is what's in the Dink-specific code (sometimes identical, but not always):
		AddKeyBinding(pComp, "Left", VIRTUAL_KEY_DIR_LEFT, VIRTUAL_KEY_DIR_LEFT);
		AddKeyBinding(pComp, "Right", VIRTUAL_KEY_DIR_RIGHT, VIRTUAL_KEY_DIR_RIGHT);
		AddKeyBinding(pComp, "Up", VIRTUAL_KEY_DIR_UP, VIRTUAL_KEY_DIR_UP);
		AddKeyBinding(pComp, "Down", VIRTUAL_KEY_DIR_DOWN, VIRTUAL_KEY_DIR_DOWN);
		AddKeyBinding(pComp, "Talk", ' ', VIRTUAL_KEY_GAME_TALK);

		AddKeyBinding(pComp, "GamePadInventory", VIRTUAL_DPAD_SELECT, VIRTUAL_KEY_GAME_INVENTORY);
		AddKeyBinding(pComp, "GamePadInventory2", VIRTUAL_DPAD_BUTTON_UP, VIRTUAL_KEY_GAME_INVENTORY);
		AddKeyBinding(pComp, "GamePadEscape", VIRTUAL_DPAD_START, VIRTUAL_KEY_BACK, true);
		AddKeyBinding(pComp, "GamePadFire", VIRTUAL_DPAD_BUTTON_DOWN, VIRTUAL_KEY_GAME_FIRE);
		AddKeyBinding(pComp, "GamePadTalk", VIRTUAL_DPAD_BUTTON_RIGHT, VIRTUAL_KEY_GAME_TALK);
		AddKeyBinding(pComp, "GamePadMagic", VIRTUAL_DPAD_BUTTON_LEFT, VIRTUAL_KEY_GAME_MAGIC);
		
		AddKeyBinding(pComp, "GamePadSpeedup", VIRTUAL_DPAD_LBUTTON, 'M', true);
		AddKeyBinding(pComp, "GamePadSpeedup2", VIRTUAL_DPAD_RBUTTON, 9);
	
		AddKeyBinding(pComp, "GamePadInventory3", VIRTUAL_DPAD_LTRIGGER, VIRTUAL_KEY_GAME_INVENTORY);
		AddKeyBinding(pComp, "GamePadPause", VIRTUAL_DPAD_RTRIGGER, VIRTUAL_KEY_BACK, true);
In the android specific code, he has this:
	case 4:
		//actually this will never get hit, the java side will send VIRTUAL_DPAD_BUTTON_RIGHT directly, because it
		//shares stuff with the back button and has to detect which one it is on that side
		keycode = VIRTUAL_DPAD_BUTTON_RIGHT;
		break;
'case 4' is the Android keycode, so that is supposed to be translated into talking. But 4 is actually KEYCODE_BACK in Android-speak. Despite what the comment says, this doesn't seem to work.

I couldn't find anywhere that the Android platform code sets VIRTUAL_DPAD_BUTTON_DOWN, which means there is no way to attack with Android if I'm reading the code correctly.

According to the android docs (https://developer.android.com/training/game-controllers/controller-input), they have several keycodes defined for the buttons, and we could probably convince Seth to update the buttons with something reasonable.

What should the buttons do?

Maybe something like this?
LB - Map (button6)
RB - Turbo Mode
LT - Nothing
RT - Nothing
Start - Escape Menu
Sel - DinkHD Menu
X - Attack
A - Talk
B - Magic
Y - Inventory (but not wonky)
July 11th 2018, 05:57 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
It's a good controller overall. The joysticks are a bit small and don't click, but they provide a z and c button to help with this (Though they don't register as L3 and R3..) Also people complain about the right joystick and buttons being too close but with a slight claw grip it's not even bothersome. Also the triggers are digital and not analog if that matters at all. A cool feature about this controller is you can have your phone inserted vertically and use it for NDS emulation.

Anyways, this is how Dink uses a controller on the PC so it should be consistent.
A - Attack
B - Talk/Examine
X - Magic
Y - Inventory
RB - Turbo
LB - Map (Button6)
Start - Escape Menu
Select - Inventory


A second inventory button is redundant so having select be the DinkHD menu should be fine.

If we were able to remap in settings via selecting say 'attack' and then pressing the button we want, that would be ideal.

Afaik triggers don't have an associated button and can't be used with Dink in general so if they were added it would be cool.

What would be amazing is if we could use the controller to call key scripts as there are a few DMODs that would benefit from this.
July 11th 2018, 06:09 PM
peasantmp.gif
Skurn
Peasant He/Him Equatorial Guinea duck bloop
can't flim flam the glim glam 
they don't click?

request a full refund immediately