Android controller support

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
morganw
Regular
Posts: 51
Joined: Fri Nov 20, 2015 7:00 pm
Contact:

Android controller support

#1 Post by morganw » Sun Jan 29, 2017 1:00 pm

Has anyone else tried building a game for an Android based media box, rather than for a phone or tablet? I've tried on an Amazon Fire TV 2 and it seems that the controller detection function returns that no controllers are connected. The wireless remote that comes with the box can work the game, but a wired Xbox 360 controller that's connected cannot.

The controller works the actual box fine, up until the game is launched.
I've tried taking the batteries out of the remote so that only the controller is connected.

Any other suggestions to try and get it working?
Thanks.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android controller support

#2 Post by PyTom » Tue Jan 31, 2017 1:59 am

Does the amazon controller work? That's the only one that's supported on the platform. The other thing you might want to try is to to add code like:

$ _gamepad.calibrate()

somewhere in your game, to see if that detects the controller and lets you configure it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

morganw
Regular
Posts: 51
Joined: Fri Nov 20, 2015 7:00 pm
Contact:

Re: Android controller support

#3 Post by morganw » Tue Jan 31, 2017 7:56 pm

Unfortunately I don't have one that I can test with. Later builds did add support for other controllers though:
http://www.aftvnews.com/amazon-fire-tv- ... full-list/

I was testing with GamepadExists(developer=False), which returned False, but I'll have another look at it.

Post Reply

Who is online

Users browsing this forum: Google [Bot]