[Plugin] AirConsole - local multiplayer for your game

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Plugin version 1.4.8 is out!

    Very simple update as this one just adds two expressions:

    "GetNickname"

    "GetProfilePicture"

    Download on official channel: https://github.com/AirConsole/airconsole-construct2

    My repo: https://github.com/Psychokiller1888/air ... construct2

  • Psychokiller1888 i find out that there is some weird trouble with DeviceJoin, some times it just doesn't triggers or takes too long to recive idnickname and number, BUT you can recive messages... at the end, i had to check if the player joins by listening their messages. ¿it's just me or it actually have that issue?

  • Hey! Some little bugs yes, but for what I have seen so far, after days debugging, it's in 95% of the cases due to construct 2. If your controller reacts, it is connected, it's as simple as that. Are you sure of your code C2 side? Do you broadcast game ready? Do you use a custom loader? Try Browser.log to debug. Quite honestly, my onjoins are all triggering.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey! Some little bugs yes, but for what I have seen so far, after days debugging, it's in 95% of the cases due to construct 2. If your controller reacts, it is connected, it's as simple as that. Are you sure of your code C2 side? Do you broadcast game ready? Do you use a custom loader? Try Browser.log to debug. Quite honestly, my onjoins are all triggering.

    Im quite sure is in C2, but in the pluggin, my side is easy as "on join - add player" but it doesn't trigger, i hard tested with console logs from both sides (controller and C2), and found 4 cases using the same code:

    1º - It doesn't trigger deviceJoin but socket is reserved.

    2º - It doesn't trigger deviceJoin AND socket is NOT reserved so 2 controllers have the same socket (this happens only in simulator)

    3º - It triggers device join, but doesn't nicknamejoin or deviceIDJoin is 0 (i read that 0 it's suppsed to be the screen) or

    4º - It triggers completly normal, perfect.

    So maybe the first 3 or 4 players connected comes with one of the 3 first errors and the rest goes perfect.

    Im not sure if the problem is in my controller because if i restart the controller it joins perfectly. ¿is there a way to check in the controller if it had join correctly?

    Here is my controller

    http://www.heroesestudios.com/BGDEx/controller.html

  • Can you try to add a console.log(deviceId) on the controller and see if it ever is 0? 0 Is SCREEN, you are correct. When do you trigger the handshakes on the controller? $(document).ready?

  • Can you try to add a console.log(deviceId) on the controller and see if it ever is 0? 0 Is SCREEN, you are correct. When do you trigger the handshakes on the controller? $(document).ready?

    o.o how is that of "document ready"? it is not in the controller example.

  • I'm shooting in the dark here, giving you ways to try, I cannot do more I don't have what you've done so far

    So yes, I do wait the document to be ready before anything:

  • Hello Psychokiller1888 . I'm testing my game local and I uploaded my game recently through the airconsole developer website. While I'm testing my game local is running very smoothly. But when I play the game that I uploaded via https it is very lagging.

    Do you know why it might be lagging? Please let me know. Thank you!

  • I don't know unfortunately, this does not happen to me. The game runs about the same on local as on AC preview, expect for the caching part one first load of course. What kind of lag are you talking about? The game itself? Or the controllers buttons reaction time?

  • Psychokiller1888 The lagging controllers button reaction time.

  • How do you capture and send the button events? !!Do not use onClick or onTouch!!

  • 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'

    });

    });

  • This is correct at least. On what devices do you experience that high latency?

  • Psychokiller1888

    I'm using my android samsung galaxy note 3 phone.

  • I don't know why... Do you have high latency problems when playing any other games on airconsole.com?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)