• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • 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.

iOS Problem with virtual keys on iOS in GMS BETA 2.2.2.308+

Tornado

Member
Hi!

We got a big problem after we switched from BETA 2.2.2.302 to BETA 2.2.2.308.
Also tried the newest BETA 2.2.2.312, the problem is still there.

On iOS (no matter if VM or YYC), the virtual keys suddenly behave in a different way.
On Windows, Android and macOS there is no such problem.

We have two separate virtual key screen areas bound to the same keyboard virtual key. Suddenly on iOS, ONLY the screen area which is defined later reacts to touches. The area which was defined first doesn't reacts to touches at all.

So if I have this:

vkFirstX = 100;
vkFirstY = 100;
vkSecondX = 100;
vkSecondY = 300;
vkWidth = 200;
vkHeight = 100;

firstVK = virtual_key_add(vkFirstX, vkFirstY, vkWidth, vkHeight, ord("1"));
secondVK = virtual_key_add(vkSecondX, vkSecondY, vkWidth, vkHeight, ord("1"));

here only the screen area of the secondVK reacts to touches.

If I change the order of creation

secondVK = virtual_key_add(vkSecondX, vkSecondY, vkWidth, vkHeight, ord("1"));
firstVK = virtual_key_add(vkFirstX, vkFirstY, vkWidth, vkHeight, ord("1"));

then only firstVK responds to touches.

So, whatever VK area is defined as last, it exclusively takes over and anulls previos screen areas.

So, on iOS if you define several screen areas bound to the same physical key, only last defined virtual key responds. On other platforms (and also iOS before update 308) Game Maker normally makes an union of all screen areas which are bound to the same keyboard key.

I wrote a small test Project which shows this behaviuor:
https://www.dropbox.com/s/91r2cteo26gslta/VKProblem.zip?dl=0

You'll see there two gray rectangles shown via function virtual_key_show(id).
On iOs only the bottom rectange responds to touch.

Can someone test it on an iPhone or iPad device, before I file the bug report?

THX!
 
Last edited:

chirpy

Member
I can confirm it's working as intended (both keys react to touches) using stable IDE v2.2.1.375 + runtime v2.2.1.291 (from PC).
Issue occurs (only 2nd button is working) in latest beta v2.2.2.399 Runtime v2.2.2.312 (built from Mac).
 
Top