AirConsole HTML5 Game Contest 2016

0 favourites
From the Asset Store
Jump on the mole rats and see how far you can go!
  • Hey there, I'm co-organizing an HTML5 gamedev competition with AirConsole - you can win 1500 USD and the Construct 2 Business license for implementing AirConsole's API in your game. The API allows you to use your smartphone as a controller and play the game on the computer or TV.

    Compo URL: developers.airconsole.com/#/competition-2016-01

    There are also 10 runner-up prizes worth 100 USD each. The games don't have to be new, you can use any existing projects you have, and there's Construct plugin for AirConsole's API available. You keep all the rights to your games, and if the game is good enough it will get an extra promotion through the store.

    Feel free to jump in - the deadline is March 3rd. Let me know if you have any questions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • * Moved as not C2 specific

  • The contest deadline was extended to March 20th.

    There are only a few submissions so far, so if you submit your entry you’ll have a huge chance to win those, plus you’ll probably get a guaranteed 100 USD bonus for one of the top 10 mentions.

    Compo URL: developers.airconsole.com/#/competition-2016-01

  • Allright. I took a look into the details, API etc.

    First of all AirConsole looks very promising. It's really cool! Even though local multiplayer is not so popular as it was years ago, this technology seems to be able to turn the time back in some manner ... and it gives us (C2 developers) one more platform where we can build very interesting games (cause this platform needs a specific approach) and monetize them.

    Regardging working with C2. For now there is an option to build only the screen part with C2, and the controller part has to be made manually (coded). I know there is a controller generator, but that is very limited if you don't know much about coding (and most of C2 people don't).

    It would be absolutely outstanding if you guys could make some official agreement... what I mean here:

    1. AirConsole Team: extend the C2 plugin to be able to send data from controller to the screen. That's basically just a send message, so your part is easy

    2. Scirra add an official export to AirConsole. This would be basically an HTML5 export but would have to cover an option while exporting to pick the screen export or controller export (the difference between those two is actually trivial). In this situation we would be able to build a C2 app for the screen and a C2 app for the controller separately which will give us a possibility to build nice fancy controllers with animations etc.

    So the AirConsole export would have to separate C2 data files into subdirectories basically so the output would be something like:

    For AirConsole export (with screen option selected)

    gameDirectory/
       screen.html  //this is just a renamed "index.html" with changed references to the libraries etc. to "screenDataDirectory/*" instead of "./*"
       screenDataDirectory/  //here would be all the C2 data files except the index.html
    [/code:pipaxeqy]
    
    [b]For AirConsole export (with controller option selected)[/b]
    [code:pipaxeqy]gameDirectory/
       controller.html
       controllerDataDirectory/[/code:pipaxeqy]
    
    [b]And the final output would be[/b]
    [code:pipaxeqy]gameDirectory/
       screen.html
       screenDataDirectory/
       controller.html
       controllerDataDirectory/[/code:pipaxeqy]
    
    As I believe the renaming index.html to controller.html (or screen.html) is trivial to do, I don't know how much work to do is to change all the files/libraries dependencies so the main html file would search for the data in the subdirectory.
    
    I took a quick look into c2runtime.js and I see there is no "path" variable, everything is being fetched relatively from the "./" folder, so it won't be just a matter of changing the variable. Anyway didn't go into details of this (huge ) file. 
    
    

    Ashley could you tell if this is something that could be done with relatively no effort or it's pretty much of work? Or maybe you can give some hint's how to do this manually? I mean if there are just several places to change like:[/p] [/p] [code:pipaxeqy]var datajs_filename = "data.js";[/code:pipaxeqy][/p] to[/p] [code:pipaxeqy]var datajs_filename = subDir + "data.js";[/code:pipaxeqy]

  • Allright. I've spent several hours playing around with AirConsole and C2 now.

    There seems to be bigger problem. There is a very limited controller support in C2 AirConsole plugin.

    Basically C2 AC plugin listens for "message" key with the specific value. So you can set only "states", but you cannot make an action based on some generic parameters (like joystic move, degrees, cords etc.).

    AirConsole controller generator does not send "message" key at all. It sends various keys depends on the controller element you pick. Let's talk about Joystic.

    By default it sends something like this

    "touchmove": function(position) {
              airconsole.message(AirConsole.SCREEN, {
                "joystick_left": {
                  position: position
                }
              });
            }[/code:2w77hi4h]
    So as you can see the message key is "[u]joystick_left[/u]", not "[u]message[/u]". So it is not possible to grab this with C2 AC plugin. 
    
    [b]Now even if we set it to[/b]
    [code:2w77hi4h]
    "touchmove": function(position) {
              airconsole.message(AirConsole.SCREEN, {
                "message": {
                  position: position
                }
              });
            }[/code:2w77hi4h]
    ...we still cannot grab it, because in C2 AC plugin you need to [u]specify the value[/u] you are expecting. It is not possible to specify the position, because it is generic, so you cannot grab it.
    
    [b]What works is (C2 plugin can grab)[/b]
    [code:2w77hi4h]
    "touchmove": function(position) {
              airconsole.message(AirConsole.SCREEN, {
                "message": "move"
                }
              });
            }[/code:2w77hi4h]
    ... but this is obviously [u]useless[/u], because we need a specific cords here.
    
    So for now usage of AirConsole plugin is very limited, and still you have to code the controller.
    
    I already sent an email to AirConsole asking if there is any way to grab generated controller data with C2 AC plugin. Would be even enough if this plugin had something like "On any message recieved" then we could parse the message in C2 at least.
  • It looks like I found a workaround. In C2 AC plugin you have to set condition to On Message is "AirConsole.Message", and then you basically grab the whole content of the message and can parse it.

  • I don't get it, It's have to be Local multiplayer in game for this platform?

  • I'm not sure if it must be local multiplayer, but AirConsole is fun simply because of that so I believe at least two players are recommended for the contest.

  • Is there any AirConsole plugin for Construct 2?

  • There is

    However it's like an alpha stage plugin. You have to do some tricks to make a use of it actually. And the controller you have to code manually anyway. So I'm afraid people who are not familiar with web development (JS, HTML, CSS) will have a hard time making one.

    Anyway if any of you wan't to try it, I can help. It seems I managed to do fully working workarounds so I am able to communicate screen and controller with generic data as well now.

  • Hi guys,

    I am the developer of the AirConsole Construct2 plugin.

    We have a controller-generator with which you can actually build your own controllers pretty quickly and easy.

    However, its true that it does not work yet with Construct2. Instead you have to be able to write some JS and HTML code to create your own controller.

    I am pretty new to Construct2 and I wonder if there is a way to parse JSON data in Construct2.

    E.g. an JSON object like:

    dpadrelative-left: {
      message: {
         direction: "down",
         pressed: false
      }
    }
    [/code:53nyy3vr]
    
    Or s.t. like:
    [code:53nyy3vr]
    {
      message: {
        x: 2,
        y: -23
      },
      pressed: true
    }
    [/code:53nyy3vr]
    If that works in Construct2, it would be much easier to adapt the Controller-Generator also for Construct2.
    Any ideas?
    
    Thank you!
  • FraConsole: This kind of question should rather be searched for and asked in the Javascript SDK forum.

  • FraConsole in C2 you can load only strings and numbers. You can load JSON into Dictionary object but it needs a specific format.

    Solution for now is to send specific C2 JSON from the controller to C2 and load it into Dictionary so you can use the data. This is the solution which I've implemented in Zombie Annihilation so you can check my controller.html there.

    BTW: Just realized that probably better solution would be to send only data and wrap it with C2 Dictionary JSON header inside C2 already. That way less data would be send every message. I will make an update to my controller later.

    But obviously it would be the best if AC C2 plugin would parse incomming data by itself.

  • were you able to customize your controller graphics or did you use the basic template?

    also, have you considered writing a post explaining your process and experiences with publishing to airconsole? it is a very interesting platform with a lot of potential. so others may be wanting to know how to get started.

  • Thank you!

    I just had a look at your code. So basically something like this:

    airconsole.message(AirConsole.SCREEN, {
      "message": '{"c2dictionary":true,"data":{"action":"joystick_move","x":' + position.x + '}}'
    });
    [/code:3g44sdkf]
    
    Would be easier if I just send the data property:
     [code:3g44sdkf]
    airconsole.message(AirConsole.SCREEN, {
        action: "joystick_move",
        x: position.x
    });
    [/code:3g44sdkf]
    
    And the AirConsole Plugin adds the c2dictionary attribute etc.
    And in Construct2 you would have to always use the dictionary to parse the data
    Would that be better?
    
    Thank you!
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)