cjbruce's Recent Forum Activity

  • Hmmm... I haven't used the "On tab gesture" for any of my projects. I typically use "On touched object" for buttons.

  • Sweet! We are too! After the 10th we should make a thread for all of the AirConsole games made with C2.

  • Anion,

    You don't actually have to create a separate mobile version -- everything can (and should) be done directly in your existing project. I recommend the following:

    1. Add the "Touch" object, and use it instead of all mouse inputs. They work pretty much the same way, you just lose the ability to hover over something.

    2. For the textfield, keep track of when it loses focus and enable the button afterward. If it isn't losing focus properly, you can manually close the keyboard and enable the button on any touch that is received outside of the textfield.

  • Nice work, and best of luck in the competition!

    Are you guys launching on the 10th?

  • ,

    Food for thought, if you want to really go nuts with the math:

    1. The damage can be expressed as proportional to the loss in kinetic energy, which is proportional to the square of the change in velocity.

    2. In real life, this damage would be distributed over a volume. How this volume of damage appears from a 2D side view could be completely unpredictable depending on the internal structure of the car and where the car was hit.

    In the end, the random approach might be the best-looking model of all. I would totally go with it if it looks good.

  • Try Construct 3

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

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

    Not yet! The AirConsole team was at GDC in San Francisco last week, and I imagine they are up to their eyeballs in play testing at the moment. They are planning to announce the winners on March 10th.

    I've got my fingers crossed that someone in the Construct 2 community makes the top three. It would be pretty cool if one or more of us win.

  • X3M,

    Thanks for the suggestions and for your hard work getting this together.

    Unfortunately for me, my first task will be to retrofit an old project with the new controller. I'll do it this way for any new projects though.

  • X3M,

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

    Drat.

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

  • 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.
  • I just realized that I have been going about this all wrong. All I have to do is redirect the user to the new directory. Here is the final solution.

    <!DOCTYPE html>
    <html>
    <script type="text/javascript">
    	window.location.href = "content/index.html";
    </script>
    </html>[/code:1qlphgbt]
    
    If anyone is making games for AirConsole, or similar, this should work as a way to separate the controller.html and screen.html files.  Just use a redirect for each of them to the appropriate directory, and you are all set.
  • So far no luck with Solution #1.

    Solution #2 is working fine on my desktop Safari browser, but it is doing weird things on my iPad, iPhone, and Nexus 5:

    1. Resizing no longer works correctly on screen rotations for mobile devices. It does not scale down below the menu bar, meaning the top portion of the display is covered by the menu bar.

    2. On my iPad it takes a very long time for the scale to autofit to the screen width. On my iPhone, it doesn't autofit at all. On my Nexus 5, it auto fits instantly and correctly. This appears to be a problem with the Q3D plugin, as the behavior completely changes when I set the Q3DMaster object scale/position to "Positioned" instead of "AutoFit". QuaziGNRLnose, any ideas?

    It is definitely good enough for desktops and chromebooks, but there are a lot of iPad-only schools (I work in one), and mobile users that PBS is hoping to target as well.

    https://dl.dropboxusercontent.com/u/55106174/pbstest/index.html

    Here is my code so far:

    <!DOCTYPE html>
    <html>
    <body style="background-color:black;margin:0;padding:0;overflow: hidden;">
    
    <iframe src="content/index.html" style="width:100vw;height:100vh;min-height:100%;min-width:100%;border:none;">
      <p>Your browser does not support iframes.</p>
    </iframe>
    
    </body>
    </html>[/code:3mkkjflx]
cjbruce's avatar

cjbruce

Early Adopter

Member since 25 Apr, 2013

Twitter
cjbruce has 4 followers

Connect with cjbruce

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies