Vector-Pinball icon indicating copy to clipboard operation
Vector-Pinball copied to clipboard

Ball got stuck top left corner

Open seabastion opened this issue 11 years ago • 15 comments

I didn't manage to get a screenshot but somehow the ball got stuck on the "default" table up at the top left corner just to the right of the white circle.

seabastion avatar Jul 29 '14 04:07 seabastion

I just encountered the same! It is a very edge case probably. The ball just stayed there and I had to quit the game and start again to fix the problem.

And I managed to get a screenshot :grinning:

Screenshot 2015 03 01 15 45 56

notfoss avatar Mar 02 '15 05:03 notfoss

The ball got stuck again, but this time it got stuck on the divider next to the right save.

Screenshot 2015 12 04 23 03 11

notfoss avatar Dec 07 '15 07:12 notfoss

It'd be cool if we could use the accelerometer to tilt the machine, eh?

ghost avatar Dec 08 '15 08:12 ghost

I was thinking of the exact same thing! In fact, the first time this happened, I instinctively tried tilting the phone to see if something happens :p

notfoss avatar Dec 08 '15 08:12 notfoss

Found this in field.java. Looks like most of the necessary code has already been written. :o

    /** Adjusts gravity in response to the device being tilted; not currently used. */
    public void receivedOrientationValues(float azimuth, float pitch, float roll) {
        double angle = roll - Math.PI/2;
        float gravity = layout.getGravity();
        float gx = (float)(gravity * Math.cos(angle));
        float gy = -Math.abs((float)(gravity * Math.sin(angle)));
        world.setGravity(new Vector2(gx, gy));
    }

ghost avatar Dec 09 '15 02:12 ghost

Right, I haven't enabled tilting because avoiding false positives can be tricky. But feel free to play around with the code and let me know if you come up with something good.

I would like to at least detect the case of the ball getting stuck and then "auto-bump" it.

dozingcat avatar Dec 12 '15 16:12 dozingcat

Commit 9f35df62b503f4dbf863d658f0ffcbf8dcb4e664 attempts to detect when the ball is stuck and nudge it.

dozingcat avatar Dec 13 '15 06:12 dozingcat

That's great! But considering that the ball getting stuck happens so rarely, we might have to wait for a long time before we can confirm that the fix works. But I'll make sure to post a comment here.

On a side note, can you bump the version, so that I can get it from f-droid?

notfoss avatar Dec 13 '15 15:12 notfoss

If it doesn't otherwise affect the game play, I'd recommend bumping to Google play too. This has happened to me many times, especially on the many-color-small-bumpers board where there are two places the ball can rest on a bumper if it's slow enough. Believe it or not, I actually got it stuck on the single-pixel-wide line between the side alleys. Does this mean I play too much?

Anyway, here's hoping the bump is is a random direction. A vertical bump would return it to its original position in the last case.

jaxankey avatar Jan 10 '16 15:01 jaxankey

(Note also the bump should be big enough to set off the bumpers in case it is wedged)

jaxankey avatar Jan 10 '16 15:01 jaxankey

Hi there, everyone! First of all, huge thanks @dozingcat for developing this neat app and especially for publishing it on F-Droid! About this Issue: Ha, the same thing happened to me the other day, I did take a screenshot and just wanted to file this when I noticed that @seabastion already did. If you ask me, I'd vote for implementing the tilt as suggested in https://github.com/dozingcat/Vector-Pinball/issues/7#issuecomment-162807752, of course including setting off the bumpers. This even opens up the possibility to add a funky a noise alarm when shaking the phone.

SecUpwN avatar Jan 13 '16 05:01 SecUpwN

Yeah, the "shake the phone" option could work, just requiring a very high threshold / violent shake to bump the ball and set off the bumpers.

On Wed, Jan 13, 2016 at 12:50 AM, Security: Pwned. <[email protected]

wrote:

Hi there, everyone! First of all, huge thanks @dozingcat https://github.com/dozingcat for developing this neat app and especially for publishing it on F-Droid! About this Issue: Ha, the same thing happened to me the other day, I did take a screenshot and just wanted to file this when I noticed that @seabastion https://github.com/seabastion already did. If you ask me, I'd vote for implementing the tilt as suggested in #7 (comment) https://github.com/dozingcat/Vector-Pinball/issues/7#issuecomment-162807752, of course including setting off the bumpers. This even opens up the possibility to add a funky a noise alarm when shaking the phone.

— Reply to this email directly or view it on GitHub https://github.com/dozingcat/Vector-Pinball/issues/7#issuecomment-171177518 .

jaxankey avatar Jan 13 '16 15:01 jaxankey

Version 1.5.2 with the auto-bump fix should be available the Play store now.

dozingcat avatar Jan 16 '16 20:01 dozingcat

Version 1.5.2 with the auto-bump fix should be available the Play store now.

I`m a privacy-geek and only update via F-Droid. Hope to see it there soon.

SecUpwN avatar Jan 17 '16 06:01 SecUpwN

Yeah, the "shake the phone" option could work, just requiring a very high threshold / violent shake to bump the ball and set off the bumpers.

As well as a possible feature to lock the table up if it's tilted too much.

ghost avatar Aug 27 '19 01:08 ghost