Android debug keys

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Android debug keys

Post by Willy Elektrix »

Is there a way to view the script debgging tools while running the Android version of the game.exe? I found a bug in the Android version of my game that isn't replicated in the PC version.

I think the bug might be related to me using "run script by ID". The script seems to be hanging on that command until I press the B/esc button. Hard to say without being able to tell what script is running.

EDIT: No. It's related to something different. Maybe the autosave command isn't working. Hm. Still working on it. Regardless, debug keys would be cool.
Last edited by Willy Elektrix on Mon Sep 14, 2020 3:27 pm, edited 4 times in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I don't know a good generic way to do it, but maybe we could rig up a apk build for you that has a third button mapped to the main debug menu button.

Have a look at "Platform Specific Options" to enable an extra button and set what it does
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

Bob the Hamster wrote:I don't know a good generic way to do it, but maybe we could rig up a apk build for you that has a third button mapped to the main debug menu button.

Have a look at "Platform Specific Options" to enable an extra button and set what it does
Good idea. Thank you!
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

It definitely is needed. But I couldn't think of a good way to access it. If it respects the "Enable debug keys" setting it doesn't need to be too hidden. Something like pressing both volume buttons at once.
User avatar
Mogri
Super Slime
Posts: 4668
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

TMC wrote:It definitely is needed. But I couldn't think of a good way to access it. If it respects the "Enable debug keys" setting it doesn't need to be too hidden. Something like pressing both volume buttons at once.
That's not possible on all devices.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Ack. Suggestions? Ideally shouldn't require the on-screen gamepad, since that isn't always visible.
Last edited by TMC on Tue Sep 15, 2020 4:39 pm, edited 1 time in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Yeah, volume buttons are sometimes (often?) A rocker that you can't press both at the same time.

Voldown + lock is reserved for screenshot.
Volup + lock seems to mute the ringer on some phones

I don't think there is a good generic option
User avatar
Mogri
Super Slime
Posts: 4668
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Perhaps "hold 'volume down' for five seconds"? I can see people doing that on accident, though.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Tap out SOS in morse code on any volume button! :D
User avatar
Rue
Slime Knight
Posts: 135
Joined: Sun Dec 09, 2007 4:01 am
Location: Bellevue, WA
Contact:

Post by Rue »

Can the OHR recognize gestures? That would probably be the best way to implement it.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

The sdl-android port has code for recognising gestures (hardcoded ones, I think?), but I've never tried it to see how well it works.

If debug keys are disabled it could just bring up a menu of non-debug functions, such as taking a screenshot/gif, and emailing a bug report/save to the dev (long implemented but inaccessible except through scripting).

If it doesn't contain debug features then it's no big deal if the player accidentally enters it, since they can just exit. So it could be a simple, even discoverable, key sequence like volume up-volume down-volume up.
Last edited by TMC on Fri Sep 18, 2020 3:38 am, edited 3 times in total.
User avatar
Rue
Slime Knight
Posts: 135
Joined: Sun Dec 09, 2007 4:01 am
Location: Bellevue, WA
Contact:

Post by Rue »

I'd say just make the gesture complicated enough so nobody accidentally enters it, or have the users who are asking for android builds request for the debug gesture to be added. Or both.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I actually have gestures disabled on our Android builds, because the defaults includes some that were crazy easy to do by accident, like "swipe up"
Post Reply