How do I use Touch-Object

0 favourites
  • 5 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello,

    I made a little html5 game with construct 2.

    Now I want to convert it for Android.

    I did it with the "Intel XDK", everything worked fine. In the emulator of "Intel XDK" the Touch-Object worked fine (with mouse on pc).

    After building the android-app, I downloaded the App to my HTC-One-Android-Smartphone and the Touch-Object didn't work anymore.

    Here is a Screen of the Touch-Events:

    The Objects are just little Buttons (200*50px).

    I also tried other touch-events. I also tried the Touch-Event "On any Touch" (so not on an object, just a touch, but also nothing happens).

    I don't know how I can fix it, I tried like 2 hours changing the Touch-Events... I also searched in the Construct 2 Tutorials but couldnt found anything that helped me.

    So if someone knows the problem I would be very thankful

    Best regards.

  • Touch objects should work fine. Can you try in the "Debug" tab of the XDK? You will have to install App Preview, but you can debug your app without rebuilding. This will also give you access to Chrome Developer Tools to see if there are any JS errors causing problems.

  • Hello,

    thanks for help.

    I downloaded the App-Preview and with the App-Preview the touch-object worked on my android phone. (it also made some insane laggs in the game, is this normal?)

    Than I build the .apk again with Intel-XDK and downloaded + installed the app but still doesnt work...

    Maybe I make a mistake at the build-app:

    I just click on "BUILD" than on "Android" at "CORDOVA 3.X HYBRID MOBILE APP PLATFORMS" and after that I can download the .apk file. I upload it to my webspace and download it to the phone and install it and than the touch-effects don't work.

    Do I make some mistakes by building the app with Intel XDK ?

    Best regards.

    Edit:

    Also when I export the construct2 Project to HTML 5 with Touch-Events, they don't work on my smartphone.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should be building for Crosswalk. There shouldn't be "insane laggs" from touch events.

  • Hello,

    I tested a bit more and made the HTML5-Version including touch-events ready.

    On my Browser everything works fine. I tested it on a touch-tablet and it also works, but the performance is really bad. (only on mobile devices / tablets, on PC everything works perfect!)

    The Size of the HTML5-Version is like 3 MB and it also loads very fast, but than the game is just lagging...

    Are there any options to "tune" the performance of the app? Or is it normal that the HTML5-Version makes some laggs on smartphones / tablets?

    Best regards.

    Maybe this is helpful:

    I run the debugmode in Construct 2 and I got in the game mode (where the laggs are) following informations:

    -> over 250.000 Collision-checks / second

    -> 4.000 poly-checks / second

    -> 200 Moved cell / second

    -> 16 cell count

    -> 119 objects

    The game mode is like a match3-game and there are 64 objects (8x8) on the field. If I disable the collision for the field objects, there are only 100 collision-checks / second. So I think the 64 match3-objects on the field causes the laggs.

    But how can I fix this? I've created just 5 different objects and they are spawning in the game mode so that there are 64 objects on field. Is there a better way to do this?

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