• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Virtual keys, the right way?

Nahual

Member
Hello to all my GMS users out there!
First, I want to say that I am beyond happy with how much this community has grown and how well GM still does around game developers. :D

I do have a conundrum that I cant seem to shake off lately and I was hoping anybody here could perhaps lend me a hand. (fingers crossed)

I have finished my game, it is out on Steam and some other indie online stores and is out for MAC and PC but now, I'd like to have it on Android and I did some research and I thought I had everything covered, including the virtual keys, I read the GMS help file on how VK work, using an old Android phone I had laying around for years I made my game work beautifully. Until I asked my girlfriend if I could test the game on her phone and to my surprise, the VK were all misplaced and not set where I originally had coded them.

Making me think that obviously every Android phone and or tablet will be different due to the screen size and resolution. So my question is this: How can I make sure the VK are coded and placed the right way on every Android device?

This is probably super n00b thing to ask but if I may be honest, I am burnt out. :/
Any help will be much appreciate it guys! Thanks in advance.

PS: this is an example of how I coded the VK
[object gamepad with a gamepad sprite]
[draw event]
draw_sprite(spr_touchpad,0 ,view_xview+55, view_yview+220);

--separate object placed on top of gamepad sprite--
[object touch button with no sprite]
right = virtual_key_add(260, 550, 70, 70, vk_right);
 
Top