AirConsole Game Dev Contest 2017

0 favourites
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • So, I just learned Dropbox's public folder don't work anymore. Sigh.

    Anyway, I exported the pong example and uploaded to pong-siks-airconsole.bitballoon.com/. To use AirConsole, your index.html will become screen.html and you need to have a controller.html too. The bitballoon page won't upload something without a index.html file, which kinda makes sense, so I just threw an empty index.html.

    Turns out doing https://www.airconsole.com/?pong-siks-airconsole.bitballoon.com/ like just takes me to the main page ignoring the parameter so I'm not sure what's wrong.

    I can, however, use their simulator using http://www.airconsole.com/simulator/#http://pong-siks-airconsole.bitballoon.com/. It loads the controllers super fast and you can even use your smartphone to login the game, but it takes a quite a long time to load the main page but it does load. Sadly, the controllers don't respond and the game is acting like there are no controllers on.

    Of course, I'm trying some random free server for testing, as I don't own a server for me.

    Any ideas?

    EDIT: Using http://www.airconsole.com/?http=1#http://pong-siks-airconsole.bitballoon.com/ goes the same as the simulator.

  • To my mind airconsole is very intresting idea and i'd like to adopt my game that made in C2 It satisfied requierements of airconsole.

    Unfortunetly main diffeculties connected with controller.html. Frankly speaking I'm not familiar with javascript good enough and would like to use controller generator from (http://developers.airconsole.com/tools/ ... oller.html).

    During my experiments with it in console of Google Chrome I found that it sends messages to screen.html and the type of messages is not string but the object that contains the key of the object and it's condition "pressed".

    I'm not expirienced developer to adopt javascript code of such controller it could just sends for example for d-pad messages as strings like "DPAD-LEFT", "DPAD-Right", "DPAD-stopLEFT", DPAD-stopRight" to screen.html.

    Is there a way to simplify work connected with creating controller.html with predefined controls to handle messages they send in C2.

  • I'm trying to do the same thing with the pong game that i got from this URL. (http://developers.airconsole.com/#!/guides/construct2#%2Fguides%2Fconstruct2) I uploaded the files to 000webhostapp.com. So I try to run the game in the simulator but the screen stays with the loading airconsole page. Please really need help with this so I can start working on my game.

    This is the URL (https://www.airconsole.com/simulator/#h ... .com/Pong/)

  • [quote:36nhs6p1]I even remember I asked Ashley in the past if he could point us where exactly should we change paths in order to be able to put related files under separate directories.... but got no reply so this would need to be investigated.

    I hope this was just an oversight on his part, I believe AirConsole and Construct2 is a good pairing.

  • Hi, I got a stupid question (I don't know coding), let's say we created a joystick using AirConsole Controller Generator. Do we copy and paste it into project that we exported?

  • arod17pr did you make sure to change the index.html to screen.html and that screen.html and controller.html are on the root?

    Also to test your test it's http://airconsole.com/simulator/#debug:YOUR_HOST_OR_URL using the #debug.

    Eg. http://www.airconsole.com/simulator/#de ... mes.co.nf/

    Hope this helps <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • piszozo

    The controller creator says it does not work for C2.

    The "workaround" is this thread.

  • Current plugin allows only to send simple messages. The trick I'm using as you saw in my earlier post is that I'm sending a C2 Dictionary JSON as a message string. As you know you can have as many data as you want with C2 Dictionary. So basically the trick is to send all data from Controller to Screen with C2 Dict JSON and then pick it with the screen (C2 app) and load into some Dictionary. Once it's loaded you have easy access to all data you sent with JSON.

     airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"player_ready"}}'
                });[/code:3d5mt2xy]
  • Im having an issue. I first was able to load the game and the controller. Now it stays loading.

  • Hello everyone,

    Thanks for sharing the contest with us. I will try to participate. I just have one question. How do I settup my controllers ?

    I have tried planty of things but I really don't know javascript.

    I tried to reproduce exemples given in the github but without success. I also tried using the controller generator but then, I dunno how to get the data back on c2.

    Could someone give an exemple of a working controller using a Dpad and how he gets the message ?

    All the best

    Love

  • Yes you need to do some coding in order to prepare the controller. But for most of controllers (I mean depends how fancy you want to make it) it's just a bit of coding. AirConsole also has a controller generator which helps to prepare standard buttons, joystics etc.

    What I was doing in my AC game, was simply sending the C2 Dictionary JSON from controller to the game itself and read that as a message in C2 project. Then based on Dictionary data I was performing some action.

    Here's the small code snippet to give a better understanding.

    > /** Start SCREEN BUTTONS **/
        var startScreen_readyButton = new Button("ready-button", {
            "down": function () {
                airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"player_ready"}}'
                });
            },
        });
    
        var startScreen_creditsButton = new Button("credits-button", {
            "down": function () {
                airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"goto_credits"}}'
                });
            },
        });
    [/code:2v8uoy08]
    
    So as you can see I'm just sending here "player_ready" or "goto_credits" string, depends on which button has been clicked on controller. You can even optimize it to send only this string instead of the whole dictionary JSON and then wrap it in C2 after fetching the string.
    

    Has anyone had any success getting the output of the joysticks to work as a C2 dictionary string? I'm looking to do dual analog joystick control, but the generated code creates a nested javascript object as output:

    {joystick-left: {pressed: true, message: {x: 0.8376799158253391, y: -0.5461614766924299}}}

  • There you go. I was planning to make some tutorials for C2 and AirConsole, but really can't find the time recently so hopefully some code snippets will help you a bit.

        var gameplayScreen_joystick = new Joystick("joystick", {
    
            "touchstart": function () {
                airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"joystick_start"}}'
                });
            },
    
            "touchmove": function (position) {
                rateLimiter.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"joystick_move","x":' + position.x + '}}'
    
                });
            },
    
            "touchend": function (had_direction) {
                airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"joystick_stop"}}'
                });
            },
    
            "distance": 90,
            "min_delta": 0.01
    
        });[/code:2wxqs6xm]
  • Hey mate, thanks for sharing but.. Do you know how to make it work with generated controller ?

  • I just can't believe there is a contest for C2 "devs" and there is not a propper tool kit for it. Just a link with "snippets" of information done by sombody not involved with airconsole.

  • I have a question that I hope someone might be able to answer... If a device connects, the trigger event is as I would expect. However, if a device disconnects, the trigger event asks you for the id of the device you are checking for. This seems a little recursive... Am I correct to load the trigger expression as below?

    <condition name="On device left" type="AirConsole">
                                <param name="DeviceID">AirConsole.DeviceIDLeft</param>[/code:rfxmw416]
    
    Thus the trigger will check against the device id that triggered the trigger...? 
    
    Thanks.
    
    Edit - very early stages of looking into this and I have nothing to test yet.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)