So I have a question for the devs: You want some help getting the nudging physics fixed up? ;)
I recently started getting back into pinball after an exceedingly long time of not playing, and as such, I've been playing a bunch of VP8 and VP9 table recreations, particularly machines I'll be playing in real life as competitions come up in the league I joined.
However, I was very confused about the discrepancies between the VP8 and VP9 nudging mechanics once I figured out they were behaving very differently. I made a post elsewhere on the forums here (possibly a little rude of a post as I was really tired and flabbergasted when I found out that VP9 was the inaccurate one and that it has spent years not being fixed) and I also took a look through the VP9 codebase up on SourceForge to see how complicated the nudging mechanics were. (Answer: Not very.)
I then searched the house for some small round objects and a nice, solid, flat surface I could use for testing some physics principles out (ended up being marbles and a coffee table) and noticed the key flaw between the physics currently in place for nudging in VP9 and the way it should work: Presently in VP9, when you nudge a table, the ball is being accelerated. With the keyboard, this results in a permanent change of trajectory. With a virtual cabinet or joystick axis, the rebound following counters out the initial acceleration factor, which gets you the proper end result if the ball doesn't hit anything, but not in the right way.
The way it's supposed to work is that it's not the ball gaining acceleration from the nudge, rather it's the table sliding beneath the ball! I imagine the ball does gain some acceleration in the process, but that acceleration matches the motion of the table beneath it because as the table slows down and prepares to rebound, so does the ball. With an acceleration-based approach, this doesn't happen because at the apex of the nudge, the ball is STILL accelerated, where in real life, it would simply be shifted from its initial position since the acceleration of the initial strike would be cancelled out BEFORE the rebound.
The other consideration is that during a nudge, the entire table acts as a moving object upon contact with the ball, imparting the full force of the impact should a playfield wall or object strike the ball in the process.
Given the present code base, these are the things which need to happen for nudging to be fixed in VP:
1. Instead of altering acceleration, the analog tilt axis values should adjust ball POSITION. In fact, the simplest thing to do would be for each ball's present position to be calculated as its desired position + tilt axises.
2. The difference in previous and present axis positions needs to be tracked for each analog axis for every physics frame so that when the ball makes contact with a part of the playfield, if there's been any change in table position for that frame it can be properly applied to the ball as the table itself having velocity upon impact.
3. Rather than maintaining two different nudging systems for analog devices (cabinet/joystick) and digital devices (keyboard), the keyboard system should simply feign an analog nudge by keeping its own axis values and adding them to the joystick axises. When a keyboard nudge is induced it simply swings its own virtual axis in one direction via an instant burst of acceleration, then it rebounds and rapidly damps that motion down to 0, just like with an actual cabinet nudge. The end result would be a ball that's shifted very slightly off-centre from where it was with no extra acceleration, unless it strikes something during the nudge, in which case it would deflect off from the #2 changes above.
If you'd like the extra help, I'd be willing to pitch in and code this myself, however, I'm extremely busy with my own projects and have never worked on an open source project before. As such, I have no experience with the SourceForge system and it would take me a day or two just getting learned up enough to even attempt to commit a change to the VP source, and that's once I can find the time. If the ideas I've presented above are satisfactory enough, then I'll simply leave you guys to it and hope to see proper nudging support in newer versions of VP soon. :B
...until then though, since I'm gonna be playing on real machines soon, I'm gonna stick with VP8 for learning basic strategies for the time being. :P
Edited by Gemini000, 29 April 2014 - 05:19 PM.