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

Nudge & Tilt: Use accelerometer to model physically nudging a pinball machine

Open hackerb9 opened this issue 2 years ago • 5 comments

I instinctively jostle my phone to the side when the ball is balanced precariously on an edge.

This ought to affect the ball, but currently does not.

Of course, shaking the phone too much should cause a tilt. Perhaps tilt detection would also be randomized somewhat, weighted by the magnitude of acceleration.

The main challenge with this is that I'm not sure of the physics equation since one is technically moving the table. I could be wrong, but I believe that if the ball is next to a wall, it would act a bit like a flipper. If not, the mass of the ball would keep it in place as the table moves underneath it and back. That could be modeled relative to the table by simply putting a force on the ball opposite of the direction the phone was bumped (and then back). But I think it would look cool if one could actually see the table shake; that is, move the playing field, not the ball.

Again, I might be wrong about how the physics work. I think a simple impulse is sufficient, but maybe the shaking is best modeled as an oscillating spring with a damper?

However, whatever equations are used, I think adding some physicality would be a great addition to Vector Pinball.

hackerb9 avatar Dec 16 '21 17:12 hackerb9

I vote for this as well!

Tilt is something iconic!

maverick74 avatar Oct 24 '22 10:10 maverick74

Yes it is a great idea, as i have made a vector wood pinball it would be really fun.

image

Jacques-Olivier-Farcy avatar Nov 03 '22 08:11 Jacques-Olivier-Farcy

I looked into it a bit and the proper name for this is nudging. It sounds like the consensus among experts is, nudging is not just a part of pinball, nudging is pinball. It's even more important to playing then being able to accurately aim.

Also, I saw a YouTube video where a champion was attempting to explain nudging. Mostly they failed, saying you just have to play to understand, but they did mention that the guess I had before was right: sometimes you nudge in order to push a bumper on the table into the ball, like when the ball is about to go down one of the side drains. Other times, you nudge to change the course of the ball, like when the ball is falling down the center and can't be reached by your flippers.

I believe the same equation for moving the table under the ball will naturally produce both effects.

hackerb9 avatar Nov 05 '22 16:11 hackerb9

Some considerations:

  • Should Vector Pinball's table physics directly map the table to what is actually happening with the device? That would be simplest, and may feel most readily natural.
  • Alternately, should only the bottom of the table be affected by nudging, as it would be on a real machine. (Imagine the Android device is just the part of the machine that one holds when playing: the bottom corners, with the flippers.)
  • Will the nudging effect need be damped down for small motions caused just by a person holding a phone or tilting it while playing? Hopefully not, as that may make it feel unrealistic.
  • If the accelerometers are mapped to the entire table and not just the bottom, should motions which are not possible on a real pinball machine be (somehow) excluded? Again, hopefully not, but it may not feel "right" to more expert players if they can nudge the top of the table.
  • Does nudging impart any spin on the ball? I suspect this is not significant as a steel ball has quite a bit of mass.

hackerb9 avatar Nov 05 '22 17:11 hackerb9

I would vote for everything "the most real possible"!

About nudging all device vs just the bottom i would leave options for both. If only one option is possible, then i would go with "all device" :)

maverick74 avatar Nov 07 '22 10:11 maverick74