Is this a Hopscotch TILT BUG?

hopscotch

#1

I have run into something strange when using the "tilt" functions in Hopscotch. I uploaded a piece of code to show what the problem (if it really is a problem) looks like. I will edit this to include a link to the project, and I will include a poll here. I just want to know, if you see the same thing I do.

  • Yes, there's something funny going on.
  • No, the line stays vertical on my device.

0voters

EDIT: Here is the link: https://c.gethopscotch.com/p/xhu2rqtdz


#2

Hmm..would love some screenshots to see what's going on on your side.Here's what's going on on mine:


#3

Interesting....

That means the line is disappearning altogether on your screen. It doesn't do that AT ALL on mine, and that wasn't even what the question is about. Wow...

I guess I should go put a dwell delay into the display of the white line, so it will be less likely to disappear like that on other devices.... Grrrr... Why can't anything be simple?

Clearly, different devices are running code differently.

Thank you, @CreativeCoder.


#4

Okay, for some silly reason, I can't update the link under the poll to reflect the change that I made in the hopes of preventing the line from disappearing. The "rules" robot that runs the forum thinks that I am trying to change the poll options. As if that's even important…:smirk:

All it's doing is interfering with trying to find out the answer to this question.

Here is the link to the modified version, getting back to the original question:

https://c.gethopscotch.com/p/xhyirk49vx


#5

It might have been because it just took a screenshot when it was on the second step (it makes a line, disappears, and redraws like the Angry Birds game, correct?) It seems to stay straight line, but would love to know your intended way it was supposed to work was, and/or how it's acting on yours.

I'll check out your updated version in a bit


#6

Hi @oio, I saw too that it didn't stay vertical. I think one of the things with the tilt values in Hopscotch though, is that they're meant for when you've got your iPad lying down flat as if on a table, and then tilting it left and right from there.

Maybe tilting the iPad left and right while it's upright makes it work differently? But if it did, then the program wouldn't have worked when you tilt your iPad all the way to the left or right :confused:


#7

Hey, there, @t1_hopscotch,

Thanks for checking this out. I have had few takers on this experiment. Per my understanding, the iDevice has a three-axis accelerometer inside of it. All three axes are supposed to be independent. So... in principle, this shouldn't pose a problem. "Right" tilt is still assigned to its respective accelerometer channel, regardless of the orientation. But you're right, I did intend for this to be run with the iPad screen vertical and to rotate it, kind of like one might rotate the steering wheel of a car.

I still don't feel like I have a good grasp of what is going on. Is it a bug? Dunno. Is it just certain iPads, like mine? Dunno. That's why I made the poll, but there aren't enough responses or votes to draw much of a conclusion yet. I'm leaning (pun intended) toward "bug".


#8

It seems to work, whether it's vertical or flat on a table. Unless I don't understand the bug and it isn't working for me. I don't know.

Do you mean it's supposed to stay vertical, as in up and down? Or just straight? Because for me it's just moving left and right on a point


#9

@CreativeCoder, thanks for asking.

So, what I would ask you to do is to run the code with your iPad upright, as if it were a mirror and you were trying to see yourself in it. The long side of the iPad would be horizontal, the short side vertical and the screen facing you.

Okay... now what I would ask you to do is to rotate the ipad, so that the screen remains facing you - again, like a steering wheel - so that the long side is no longer horizontal. Nominally, what should happen, when you do that, is that the line that keeps getting drawn and re-drawn should remain upright - pointing vertically, whether the iPad has been rotated through -90 to 90 degrees. That "stick" on the screen should remain VERTICAL, relative to other things in your room.

But on my iPad, it doesn't do that. It starts-out upright, and if you rotate the iPad to 90 degrees or to -90 degrees, yes, the line is vertical. But at intermediate angles, if you look at the stick, as compared with other physical references in your environment, you'll see that it's not vertical like it should be. What I want to know is whether that's just happening to me, or whether it's on anything that runs Hopscotch. And if it's everything, then... Why?


#10

@oio Ohhh! Now I get it. What's happening for me is it is vertical..if everything else moves the same angle.

If you crane your neck so you're looking at it at the same angle as it was rotated, then yes, it would work. But I believe you mean it is supposed to stay vertical to everything else.

It's weird, but it's certainly interesting!


#11

That's perplexing. Sounds like you don't see the problem that I am reporting.

So, let me get this straight. If you run the code, and if you look at something in your room that is vertical, like a door or a lamp post or where two walls meet, and if you twist your iPad, the stick remains parallel to those vertical references? I mean, that's what's supposed to happen, but it DOESN'T on my device. You may have to look twice. Try, say, rotating the device really slowly to 45 degrees and hold it there... is the stick still vertical? If so, we are getting different results.


#12

No, not exactly..wow this is a hard topic to describe. I just tested it out again, and this is the most bizarre part:

The tilt left controls (where the line is to the right side) seems to work. Not perfect, but pretty close if done slowly. But, strangely enough, the tilt right doesn't. It kind of overdoes it and goes way too far to the left.

I'll do my method I usually use to test out things like this and I will try it out on my phone to see if there's any change. Too much physics equals too many bugs :stuck_out_tongue_winking_eye:


#13

You are so nice to give me some other perspective on this. Thank you.

I am beginning to think that, somehow, the only right way to interpret "right tilt" in Hopscotch is if the ipad (or whatever) is lying flat on a horizontal surface - with the screen pointing upwards, instead of how I described it. There doesn't seem to even be a "tilt" value to measure the orientation of the iPad in the direction that interests me, here. I thought it would work, but, clearly, it doesn't. At least not the way I had in mind.

Where all of this matters to me is in gaming and in my crazy 3D illusion stuff. I kept getting weird responses, and now I think I know why. The accelerometers are not being read the way I assumed...