Sk8dududu
Member
I just recently added multi touch for a game that I'm making for my 2 year old daughter to her learn her abc's.
Multi-touch is pretty important because my phone is almost 100% screen so her holding it registers as a touch and wont be able to tap anything else.
It's a simple bubble game where you pop bubbles to reveal a letter which then plays an audio clip of the letter, shows a picture and says an audio clip of the picture. And then restarts to show a random letter again. (She loves bubbles, its her favourite word).
I've come across two issues that I didn't have before adding a second touch.
1: The mask for the objects has become huge, I have the collision mask set up to be only the bubble, but now it extends to about double the width for seemingly no reason.
2: The very last bubble becomes untappable. It will not pop, with either device0 or device1, (tap1 and tap2)
Another thing that has changed that I actually like is it only pops the bubble that is on the top layer which I found very odd but it's a nice feature.
I only have 2 objects, the controller and the bubble, I cannot for the life of my find out why the last bubble wont pop.
Controller step event
Bubble create event
Bubble step event
Bubble animation end event
Anyone notice why this all broke from adding a second device?
Multi-touch is pretty important because my phone is almost 100% screen so her holding it registers as a touch and wont be able to tap anything else.
It's a simple bubble game where you pop bubbles to reveal a letter which then plays an audio clip of the letter, shows a picture and says an audio clip of the picture. And then restarts to show a random letter again. (She loves bubbles, its her favourite word).
I've come across two issues that I didn't have before adding a second touch.
1: The mask for the objects has become huge, I have the collision mask set up to be only the bubble, but now it extends to about double the width for seemingly no reason.
2: The very last bubble becomes untappable. It will not pop, with either device0 or device1, (tap1 and tap2)
Another thing that has changed that I actually like is it only pops the bubble that is on the top layer which I found very odd but it's a nice feature.
I only have 2 objects, the controller and the bubble, I cannot for the life of my find out why the last bubble wont pop.
Controller step event
Code:
if !instance_exists(obj_bubble) and sound = false
{
sound = true;
switch(letter)
{
case 1: audio_play_sound(sound_a,1,false); break;
case 2: audio_play_sound(sound_b,1,false); break;
etc..
}
}
Code:
///Variables
image_speed = 0;
sprite_index = choose(spr_bubble1,spr_bubble2);
image_xscale = random_range(0.50,1);
image_yscale = image_xscale;
depth = - 10;
Code:
///Pop
//Touch one
if device_mouse_check_button_pressed(0,mb_left) == true
{
if place_meeting(device_mouse_x(0),device_mouse_y(0),obj_bubble) == true
{
with instance_place(device_mouse_x(0),device_mouse_y(0),obj_bubble)
{
image_speed = 0.35;
if global.pop = false
{
global.pop = true;
audio_play_sound(sound_bubble_pop,1,false);
}
}
}
}
//Touch two
if device_mouse_check_button_pressed(1,mb_left) == true
{
if place_meeting(device_mouse_x(1),device_mouse_y(1),obj_bubble) == true
{
with instance_place(device_mouse_x(1),device_mouse_y(1),obj_bubble)
{
image_speed = 0.25;
if global.pop = false
{
global.pop = true;
audio_play_sound(sound_bubble_pop,1,false);
}
}
}
}
Code:
///Destroy
global.pop = false;
instance_destroy();