Airconsole controller maker

  • Still no luck. I will keep at it, but let me know if you think of anything else that could be messing with the scaling settings. Thanks!

  • Note: The js error is gone, but still have continuous up-scaling issue on iOS. js error was from the airconsole plugin object being accidentally left in the controller.

  • Just fixed my scaling issue by adding back in the first part of the CSS code:

    * {

    padding: 0;

    margin: 0;

    }

    Seems to be working perfectly now.

  • Just fixed my scaling issue by adding back in the first part of the CSS code:

    * {

    padding: 0;

    margin: 0;

    }

    Seems to be working perfectly now.

    Nice, did you add it in before the updated code X3M posted? Like this?

    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
      <style type="text/css">
        * {
    			padding: 0;
    			margin: 0;
    		}
        html, body {
          height: 100%;
          overflow: hidden;
        }
        body {
          background-color: #222;
        }
        button {
          margin-bottom: 1px;
          width: 100%;
          height: 48%;
          border: 0;
          box-sizing: border-box;
          font-size: 40px;
          color: #FFFFFF;
          background-color: #333333;
          outline: none;
        }
      </style>[/code:2e6itrnx]
  • Anonnymitet Yes, that's exactly what I did.

  • StillSarah I tried and it seems to work. The screen feels more centered now so I think adding that to the code is a good thing to do Thank you for the info

  • Would it be possible to add an action to make the user sign up for AirConsole Hero? Currently only checks if the user is subscribed in AirConsole Hero, but there is no action to subscribe.

    A greeting.

  • amariscal I'll see what I can do when I'm free

  • hey X3M is it possible if you can look into implementing the rate limiter in the controller if possible?

  • hey X3M is it possible if you can look into implementing the rate limiter in the controller if possible?

    Will do in the future release

  • Hey guys,

    While working on another project, I came upon a solution that might be really elegant for AirConsole:

    THE PROBLEM

    Up until now, we have used the AirConsole Controller plugin (by X3M) and the official AirConsole plugin (by AirConsole team, with lots of improvements by Psychokiller1888) together by exporting both into the same root directory. This creates a hassle because then you have to rename the files and change the exported code. This significantly slows down testing.

    THE SOLUTION

    Instead of exporting them both into the root directory and deconflicting the exported index.html, c2runtime.js, and data.js files, do the following:

    1. Create a subdirectory within the game directory called screen/. Export your screen code (using the official AirConsole plugin) to this subdirectory.

    2. Create another subdirectory within the game directory called controller/. Export your controller code (using the AirConsole Controller plugin) to this subdirectory.

    3. In the root directory, create the following two files. These files never need to be changed:

    screen.html

    <!DOCTYPE html>
    <html>
    <script type="text/javascript">
    	window.location.href = "screen/index.html";
    </script>
    </html>[/code:1vtan5zp]
    
    controller.html
    [code:1vtan5zp]<!DOCTYPE html>
    <html>
    <script type="text/javascript">
    	window.location.href = "controller/index.html";
    </script>
    </html>[/code:1vtan5zp]
    
    Now you can keep the projects separate, always export to the same directory, and never have to change the names or any of the code in either of the exported projects.
  • cjbruce I thought of that before but the problem is that Airconsole expects the screen.html and controller.html files to be in the root directory. So unless the Airconsole team adds the option to set the directory of them individually, we cannot do much about it.

  • Both screen.html and controller.html would permanently reside in the root directory, but they would redirect to the new directory as soon as they load. I admit that I haven't tested it yet, as I don't yet have a working version of a game with both plugins. I'll try as soon as I can...

  • Try Construct 3

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

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

    I just tried my technique above, and you are correct -- the redirect doesn't work.

    Drat.

  • cjbruce Here are some tips :

    • Finish up the controller first, and then work on the game.
    • You don't need to rename the index files a second time, because the index.html and old screen.html or controller.html hold the same code. All changes are occured inside the c2runtime.js file.
    • Always start your projects off the pong game and controller example.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)