r108.2 - Issue with Touch Plugin on Win8

0 favourites
  • 8 posts
From the Asset Store
I18N - Translation plugin
$7.20 USD
10% off
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Hi I've been developing a few games specifically for Windows 8 and noticed a small problem with the touch plugin.

    Basically when you add an advertisement inside the html page generated by Construct 2 and you run it on a Windows 8 machine everything works fine. But if you touch and drag your finger over the ad and let go the touch ended for that particular touch never fires.

    Now basically for the game I'm making I only need to use one touch or Touch(0). What happens is the game doesn't work properly any more because when you touch the screen again it registers as Touch(1). And if you drag your finger over the ad again it increments to Touch(2).

    UPDATE: Also it is affecting the third party "Metro Plugin" whenever you request the user to purchase the app, the touch never ends.

    NOTE: You have to export the project as a Windows 8 project then open it in Visual Studio first. Then place the ad inside the generated html page from Construct 2.

    I did do a little test to see where exactly the touches are when a user touches the screen by drawing a sprite to that position. After you perform what I mentioned above the sprite appears where the last known touch occurred. If you hold it long enough it then shifts to where the new touch is.

    I originally though it was a Win8 bug, but the fact that Construct2 uses the last touch position randomly and then updates to the new touch position like 2 seconds later seems like the program.

  • I've heard about this before, and I'm pretty sure it's a Windows 8 bug. We definitely listen for all the touch end or touch cancel events that Windows 8 sends, and in this case it sounds like it ought to fire a touch cancel bug, but it doesn't. I'll get in touch with Microsoft and see if they can comment. In the mean time can you share a complete Visual Studio solution that demonstrates the problem so we can reproduce it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • loyalpenguin - actually I'm not sure it's a Windows 8 bug... are you using a fullscreen mode? If not, that might be related...

  • Yes, I'm using Letterbox Scale.

  • loyalpenguin - have you tried r112? I've made a change that might help.

  • Ashley Sure thing. I'll let you know what happens.

  • Ashley I did try it, unfortunately it didn't fix the problem. I'm not sure how I can send you a Visual Studio project, but it is pretty simple to reproduce the problem.

    Pretty much just add a text object to the screen and set its text to the number of touches. Then just export as a Windows 8 project. After you export it add a reference to the Microsoft Advertising SDK inside the head section like so:

    <script src="/MSAdvertisingJS/ads/ad.js"></script>

    After you do that add the following html next to the C2 canvas like this:

    <!-- The canvas the project will render to. If you change its ID, don't forget to change the

              ID the runtime looks for in the jQuery events above (ready() and cr_sizeCanvas()). -->

              <canvas id="c2canvas" width="1366" height="768" oncontextmenu="return false;" onselectstart="return false;">

                  ?The browser appears to have HTML5 disabled. Try checking the compatibility settings.

              </canvas>

         

            <div style="position:absolute; width:100%; bottom:0px;">

                <div id="myAd" style="margin-left:auto; margin-right:auto; width: 728px; height: 90px; z-index: 1;"

                  data-win-control="MicrosoftNSJS.Advertising.AdControl"

                  data-win-options="{applicationId: 'REPLACE-WITH-APPLICATION-ID', adUnitId: 'AD-UNIT-ID'}">

                </div>

            </div>

    Take note I got the instructions from here:

    msdn.microsoft.com/en-us/library/hh506343(v=msads.10).aspx

    Pretty much just run the project after that, touch inside the canvas and drag until your on top of the ad and release. Then touch the screen again and it should increment the amount of touches. You might be right about it being a Win8 thing. I just wish they had a work around for it.

    Hope this helps.

  • Ashley were you able to try the code yet? I did post something in the Microsoft forums to see if they could provide some insight.

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