[Plugin] AirConsole - local multiplayer for your game

Post your completed addons to share with the community

Post » Sun Feb 05, 2017 3:30 pm

How do you capture and send the button events? !!Do not use onClick or onTouch!!
B
33
S
12
G
3
Posts: 231
Reputation: 4,436

Post » Sun Feb 05, 2017 3:34 pm

@Psychokiller1888 I have it like this:

var down_event = isMobile() ? 'touchstart' : 'mousedown';
var up_event = isMobile() ? 'touchend' : 'mouseup';

$("#Start").on(down_event, function () {
air_console.message(AirConsole.SCREEN, {
message: 'Start'
});
});

$("#Back").on(down_event, function () {
air_console.message(AirConsole.SCREEN, {
message: 'Back'
});
});

$("#Abutton").on(down_event, function () {
air_console.message(AirConsole.SCREEN, {
message: 'Abutton'
});
});

$("#Bbutton").on(down_event, function () {
air_console.message(AirConsole.SCREEN, {
message: 'Bbutton'
});
});

$("#Bbutton").on(up_event, function () {
air_console.message(AirConsole.SCREEN, {
message: 'stopshoot'
});
});
B
11
S
3
G
1
Posts: 45
Reputation: 1,388

Post » Sun Feb 05, 2017 3:37 pm

This is correct at least. On what devices do you experience that high latency?
B
33
S
12
G
3
Posts: 231
Reputation: 4,436

Post » Sun Feb 05, 2017 3:40 pm

@Psychokiller1888

I'm using my android samsung galaxy note 3 phone.
B
11
S
3
G
1
Posts: 45
Reputation: 1,388

Post » Sun Feb 05, 2017 3:44 pm

I don't know why... Do you have high latency problems when playing any other games on airconsole.com?
B
33
S
12
G
3
Posts: 231
Reputation: 4,436

Post » Sun Feb 05, 2017 3:52 pm

@Psychokiller1888

So I tested a game in airconsole.com and I don't have high latency problems. Could it be the gameplay doing a lot of things at the same time?
B
11
S
3
G
1
Posts: 45
Reputation: 1,388

Post » Sun Feb 05, 2017 3:54 pm

You need to know if it is the controller not sending the touches input immediately, or your game not treating the onMessage immediately because too busy per exemple
B
33
S
12
G
3
Posts: 231
Reputation: 4,436

Post » Sun Feb 05, 2017 4:02 pm

@Psychokiller1888

Is there another way to get the Message from the controller? I'm using "On specific Message".
B
11
S
3
G
1
Posts: 45
Reputation: 1,388

Post » Sun Feb 05, 2017 4:06 pm

For simple property messages

OnMessageFromAnyController
OnMessageFrom
OnMessage

I usually do OnMessageFromAnyController
Then use AirConsole.DeviceId and AirConsole.Message to see what what sent
B
33
S
12
G
3
Posts: 231
Reputation: 4,436

Post » Sun Feb 05, 2017 4:11 pm

@Psychokiller1888

Can it also be the Estimated image memory 1008.5 megabytes (gameplay)? That's the busy part you are talking about?
B
11
S
3
G
1
Posts: 45
Reputation: 1,388

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests