Between Angles Detect Touch Bug [C2] Capx attached

0 favourites
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • Ashley

    Reposting this here because Ashley closed this immediately.

    between-angles-detect-touch-bug-c2_t196912

    I don't understand how a founder can be so rude and dismissive about a simple bug or maybe a coding scheme error/imperfection.

    I cannot design a simpler capx because this is the control system and things work together, all the conditions have to be tested comprehensively together.

    It's really rude to say "I don't feel like going through all your events." And there aren't that many and the problem is isolated to a very small portion.

    Still, from coding, I know the whole should be submitted.

    But to make this even simpler, because our founder appears to be really overburdened, what appears not to be working is in Line 140.

    Basically make ship go down to lower boundary and once at lower screen boundary it won't go right at the default angle of 270, even though it should.

    So I don't think 1 bug in a finished game in 4 years is too much to ask for.

    P.S. I'm a novice programmer, so the problem maybe in the coding scheme.

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

    Problem Description

    Designed a touch control system for the ship, but it glitches always at boundaries (top and bottom).

    Ship has invisible drag controls (L R in pylon area, and F [forward] B [back] located a bit behind the ship.

    To see bug, drag ship down with finger (grabbing invisible area behind the ship) all the way past taskbar to hit bottom boundary. Ship will still be at original 270 degree angle (can test this w/ textbox). R control (dragging right pylon w/ touch or mouse click) won't work at this position (the mas lower boundary), even though it should, as the condition includes the 270 degree angle for R (right) control to work and between angles includes the indicated angles per manual.

    A similar thing happens when ship hits upper screen boundary. (I have custom boundaries).

    In this slimmed down (no sprites, mostly no unnecessary variables) version, ship will also glitch and go past upper boundary, which does not happen in the full version. Not sure what happened.

    Attach a Capx

    http://www.darksunpictures.com/public/V ... EANING.zip

    Description of Capx

    touch/mouse click control system for ship object from Dark Sun game

    Steps to Reproduce Bug

    Step 1 - drag ship down w invisible control behind ship past task bar to hit lower max boundary

    Step 2 - drag right pylon to right - WON'T let you even though ship is at 270 degrees; thats the bug

    Step 3 etc. - similar thing happens at upper right boundary

    Observed Result

    ____ What happens? ____ its above

    Expected Result

    ____ What do you expect to happen? ____ its above

    Affected Browsers

    Chrome: (YES)

    Edge: Yes

    don't think anybody uses anything else

    Operating System and Service Pack

    ____ Your operating system and service pack ____

    Windows 10 all packs uptodate, but Windows 7 and others should have the same bug

    Construct 2 Version ID

    ____ Exact version ID of Construct 2 you're using ____

    Construct 2 R 245

  • Your capx link is broken. Fix it, please.

  • Construct 2 is mature software; we've fixed thousands of bugs over the 6 years it's been released. These days, genuinely over half of all bug reports are just mistakes in events. We can't deal with thousands of reports if we have to sift through hundreds of events every time, so we hold everyone to the bug report requiremenets. It's not just you, we do this routinely. The linked thread explains the rationale in detail.

  • The forum software keeps truncating the link.

    File name is: VARIABLE_CLEANING.zip

    Location is: http://www.darksunpictures.com/public/

    So if you combine that and paste in browser, download should begin.

  • Try Construct 3

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

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

    At most 19 events could be taken out of that (F control and L control). You can toggle those groups disabled if it helps. But everything else is necessary to replicate the bug.

    Ship orientation is necessary in there, so you can test, that if you change the angle just a bit up, then R control works, but it should work at the default 270 degrees w/ the coding scheme.

    But the bug appears also when utilizing the other controls at the upper screen boundary when you flip the ship around.

    So drag it up at default 270 degrees. Flip it 180 by touching outside on screen, and then try left right, and again, bug appears.

    So I really don't know what you want me to take out of there or if anything can be taken out without testing comprehensively.

  • Still can't download it...

  • How about this.

    I renamed the file.

    Just tested the link.

    It works (other one did too unless the server was acting up).

    http://www.darksunpictures.com/public/touch_bug.zip

  • Yeah I've seen your issue. The angle of the ship is 270, not BETWEEN 90 and 270. Not a bug. Change event 140 to 'between 90 and 271' and you'll find it is working. That's how I see it anyway.

  • plinkie, my man, or should I say Ashley in disguise? :p maybe not.

    That won't work because it will allow the ship to go off screen.

    At 271 degrees at the lower screen edge it tips past the line.

    I can upload a degree chart, been looking for the marked up one.

  • Yeah but you're posting it like it's a bug with Construct 2? You've just limited yourself with your own code mechanic, Ashley isn't going to help with this as though it is an engine bug.

  • What you replied makes no sense man. At 271, the ship can veer off screen.

    That's the whole point of the limitation.

    And it does seem to be some kind of bug unless someone can point out a mistake in my coding scheme or suggest one that actually works.

    My ship orientation in this instance is 90 degrees counterclockwise versus default, so 270 as default.

    Here's the official C2 degree chart for you spatially challenged gents.

    http://www.darksunpictures.com/public/degree_chart.png

    Just kidding! I'm spatially challenged. Well, when getting back to this I was, so I had to map it out and test in game. (It made perfect sense to me the first time I did this.)

    And the conditions seem to be right as far as the degree limitations.

    Remember, the whole point of this is custom boundaries and not letting the ship go off screen with touch controls depending on angle.

  • What I'm saying is that if your ship is at angle 270 it does not satisfy being between 270 and 360 therefore your event is never true.

    And the conditions seem to be right as far as the degree limitations.

    Wrong.

  • Wrong.

    Check the manual.

    Per the manual, the in between condition is supposed to include the bookend angles.

    I can quote the manual in a sec.

  • This is from the manual.

    "Is between angles

    True if the object's current angle is between the two given angles in degrees. The first and second angles must be in clockwise order. That is, Is between 0 and 45 degrees is true if the object is in a 45 degree area, but Is between 45 and 0 degrees is true if the object is in the 315 degree area from 45 degrees through 0 degrees."

    I don't know how to read that other than it includes bookend angles.

  • Hi AmpedRobot!

    The problem has nothing to do with angles. Actually, they're not even being checked at that moment. It's just that, when you go backward you can actually go beyond your PlayerYBottomBoundary variable. Because of that, the condition before the angles (Y < PlayerYBottomBoundary) prevents the movement.

    That happens because when you move forward or backward you check for the boundary BEFORE moving the ship but without taking in consideration that the movement itself may take the ship over that boundary. In order to correct this you should create a cap that makes Y equal to the boundary whenever it goes beyond it or consider the distance moved when checking the boundary. Both solutions would work fine.

    That said, I would strongly recommend that you do 3 things:

    1. Review your code, because it's very dirty and very confusing and this will probably bring you more trouble in the future. Also, a lot of the stuff you're trying to do could be done in better, simpler ways.

    2. Reconsider the controls for your game. From a game design standpoint they are terrible.

    3. Be a little more friendly in these forums. People are here to help because they want to. They don't receive anything to do that, so, a little more politeness might make people more inclined to help.

    Here's a screenshot showing my position and the boundaries. Ignore the position of the buttons. I just moved them to make it easier for me to control the ship.

    Hope this helps. Cheers!

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