jasmattkrz's Recent Forum Activity

  • Interesting. Can you tell me what hardware and OS you're using? I'm on a Flex 3 2-in-1 On Windows 10.

    And to confirm, you got this to work on a touchscreen, right? I ask because in your other post about this project you talked about mouse.x/mouse.y instead of touch.x/touch.y, and I stated that this works as expected with the mouse a as a simulated touch input.

    Thanks!

  • Hello,

    I am trying to use a touch screen to drag and drop icons around. In the attached capx, if you touch (or mouse click) on a blue icon, drag and drop works as expected. But I'd like to have an adjustable margin around the icons as well, so that if you touch the screen and you're a little off of an icon, but it's nearby, that icon is still dragged.

    By doing a distance check between the icons and the touch location, I can select an icon and move it to the touch location, but then drag and drop (which is enabled) is "inactive" unless the user lifts up their finger and taps again. I could just make a larger collision polygon, but that has many downsides.

    https://dl.dropboxusercontent.com/u/185 ... ouch1.capx

    Other functionality in this capx is:

    Touch large purple button on start for fullscreen. Triple touch or ESC to exit fullscreen (purple button reappears).

    On touch start makes a red icon top left visible, on touch end toggles it back to invisible.

    The best workaround I can think of is to have a variable toggle that bypasses "drag and drop" to set the icon's position to the touch position every tick until it's released. I suppose that's all the Drag and Drop behavior is doing anyway, so maybe that's not a big deal?

    Thanks!

    EDIT: I have two icons, and if I delete the Drag and Drop behavior from one, then the other works as expected?!

  • Hello,

    In the linked capx, I expect the following things to happen (but #4 is the problem):

    1)If you press the large purple button, the browser will enter fullscreen. To exit fullscreen, touch the screen in three places (or ESC).

    2)If you touch and drag either die, they will drag and drop.

    3)If you touch near (but not on) either die, they will set position to the touch location (I want them to immediately initialize drag and drop, which they don't, but that's a different problem).

    4)"On any touch start" sets a red icon visible in the upper left.

    5)"On any touch end" sets the red icon invisible.

    https://dl.dropboxusercontent.com/u/185 ... ouch1.capx

    ----------------

    Again, "on any touch start" is the problem. Touching the screen does not trigger the "on any touch start" condition. That only happens after movement is detected. I don't believe the tablet PC is at fault, because in Chrome everything works as expected.

    I also don't think it's a Construct 2 bug. I have tested on the same tablet PC with mouse input, and it works as expected. I've tested with touch on mobile in Firefox and Chrome and it works as expected. I've gone into about:config and made sure all settings with "touch" and "gesture" are the same on Firefox Desktop as for Firefox Mobile, but the problem persists.

    I think it's just Firefox for Desktop, but if anyone knows better please chime in ; )

    This capx is for a fun little side project dedicated to touchscreens, and I'm sure I could work around it, but I have a larger project I'd like to add touch support to and this is a pretty important trigger to be unusable on a major browser.

    Thank you!

  • The easiest thing would be for you to upload your capx so we can look at it and see if we can reproduce the problem.

  • Working from a backup was a great idea, glad it worked!

    I am using the SCML plugin in my current project, but hadn't heard of the direct draw feature (which is supposed to improve performance). This is the most recent info I could find on it I'm going to read up on it later, but if you have more current information please share!

    Once again, glad this worked out for you!

  • If Firefox is indeed pointing you in the direction of the unresponsive script, then it looks like something you're pushing into an array. It's possible that that you're pushing a lot more data into the array than you intend. Or I could be completely wrong, as I am not what you would call a "power user" ; )

    Unfortunately, you have a huge project with 2700 events. Personally, I test regularly so I can see if a new feature works or not, and I save many versions so that I can go back to a the most recent functional version in a case like this. Ideally, you would have been running the game and testing it as you developed, so you would have seen the moment where the game went from running correctly to running an unresponsive script. Of course that's not very helpful now.

    Something you can do is start disabling blocks of your code to see if you can stop running the script that is causing the issue. Test and repeat until you find it.

    Or you could ask for help again and publish the capx for others to look through.

    There may be a more technical way to find what the problem is, but I don't know it.

  • simonlickus if you already have the 36 images, you can turn them into a single animated sprite by double clicking within a layout and selecting "sprite." Then click within the layout again to open the image editor.

    When that opens, several smaller, undocked windows should appear, including the "Animation Frames" window. Simply right click within that window and select "import frames->from files" and select your 36 sprites. Then delete frame "0" (which was created before the import).

    The speed and looping of these 36 images is handled by clicking the name of the animation (default name is "default") in a different undocked window, labeled "Animations." That brings up your animations options in the contextual "properties" tab docked on the left.

    This is also covered in depth in the manual https://www.scirra.com/manual/48/image- ... ons-editor

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello.

    Unfortunately, I cannot see your link for the capx, so I'm not sure that I can help. I think you might be running your event multiple times while your key is pressed. Are you familiar with "trigger once while true?" Adding this to your key press condition may solve your problem. https://www.scirra.com/manual/124/system-conditions

  • Wild guess here, but you may be stuck in a loop. I've had similar things happen before when using "while" loops incorrectly, but I think I usually get the option to "stop unresponsive script," though I usually test in Firefox. I'd look at any loops you may be running as a potential cause.

    Have you tried loading in other browsers?

  • I believe you want to use the IAP object, which is only available in licensed versions of Construct 2. It will save the purchase to the user's account, rather than the device. https://www.scirra.com/manual/173/iap

    Currently the IAP plugin supports these platforms:

    PhoneGap Build (iOS + Android)

    CocoonJS (iOS + Android)

    Ejecta (iOS)

    Windows Store (Windows 8+, Windows Phone 8.1+)

    Blackberry 10

    Amazon Appstore

    Tizen

  • Yes. In the properties window, click on "Project Properties View" then change "Window Size" to your desired width and height.

  • You can simply create a new layout for your splash screen, then set that layout to be the "First Layout" by clicking "view" next to project properties (in the properties window) and selecting the new layout. Then when someone clicks on the splash screen (or a timer ends, etc), have it run the action "go to layout," pointing to the first layout of the actual game.

    If you're actually looking to make a custom layout that runs while the project loads, that's a "loader layout," and is handled differently https://www.scirra.com/tutorials/318/ho ... ng-screens

jasmattkrz's avatar

jasmattkrz

Member since 14 Apr, 2016

None one is following jasmattkrz yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies