Jump to content



Photo
- - - - -

VPX nudging

vpx nudge

  • Please log in to reply
111 replies to this topic

#101 sniiki

sniiki

    Enthusiast

  • Members
  • PipPipPip
  • 80 posts

  • Flag: Finland

  • Favorite Pinball: Attack from Mars

Posted 11 July 2019 - 09:33 PM

Sry for mixed terminology. Originally referred to it as a "fake nudge" but that's something usually related to visual nudge effect. "Bangback" is term found from vpx files and afaik it is same as "centertilt" in scripts or "forward nudge" in key preferences. Any way the problem is still the same old. When sim bob triggers tilt it sends this extra nudge command which equals to pressing forward nudge from keyboard and makes the ball jump like in the video I posted in this thread some time ago.

That other bug with registry values not changing and tick box having no effect I just found while troubleshooting and testing with real bob.

#102 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,133 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 11 July 2019 - 10:41 PM

Does rawds post here help you?
https://www.vpforums...c=38417&page=19

#103 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 11 July 2019 - 10:56 PM

Dupe

 


Edited by DJRobX, 12 July 2019 - 12:14 AM.


#104 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 11 July 2019 - 11:11 PM

 

So it'll send CenterTiltKey every time the simulated bob triggers. To me it seems quite obvious everyone using simulated bob is getting that extra nudge then?

 

 

 

Sending a key is needed so that Vpinmame registers the tilt.    The bob should only be registering when there is hard enough event to tilt.     The digital plumb is NOT used for nudge action, it is only used for tilt.   There is separate code elsewhere for normal nudging. 

One could select a "nudge plugin" in the core scripts that does not register extra ball impact on keypress. 

I suspect nobody has really paid attention to that second nudge on a tilt, because you probably have to have been pretty violent in to trigger it.    Most people have a hard enough time even dialing the virtual tilt in, in the first place.  Using a real tilt bob is commonly recommended because the virtual one is too tough to configure and too affected by things like shakers and speakers.    

 

The imprecise polling of the joystick interface to read the accelerometer is one huge cause of the over-sensitivity to speakers/shakers.    I made a pretty good improvement to that by tweaking pinscape parameters, but it's far from perfect.   Using some kind of packet stream interface (even raw joystick HID events) to transmit the accelerometer data would help a lot.    MJR and I were both in agreement that it would help, but I don't think either of us have had the time to work to actually implement it. 

 

 

 

I just wonder why there's no-one responding in this thread  :(

 

I think MJR is the closest person we have to someone who really has much knowledge about how VPX nudging works, and he's not terribly active in VPX development these days.   The guy who did the current ball physics implementation (mukuste) has not been seen in a long time, and most of this code is otherwise really old stuff that pre-dates most of us.     Most of what I learned and did was just out of frustration trying to get it to mostly work on my own setup.   I'm not even much of a nudger on real pins, so I took it about as far as I wanted to go.

Since you seem to be savvy enough to read the C++ code I would encourage you to keep at it, there's probably lots of things you can do to improve the situation!  


Edited by DJRobX, 12 July 2019 - 12:14 AM.


#105 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,954 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 11 July 2019 - 11:56 PM

Thank you very much for this info Rob ! Appreciate you're taking the time to give a good and proper response !


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#106 sniiki

sniiki

    Enthusiast

  • Members
  • PipPipPip
  • 80 posts

  • Flag: Finland

  • Favorite Pinball: Attack from Mars

Posted 12 July 2019 - 08:27 AM

Yes! Many thanks for Joe and Rob for any input on this topic!

 

Does rawds post here help you?
https://www.vpforums...c=38417&page=19

Prev page of this thread I was pretty sure it fixed this issue but either I just didn't noticed it's still there or then something has changed in scripts/c++ code but no, at least now it wont help.

 

 

 

 

So it'll send CenterTiltKey every time the simulated bob triggers. To me it seems quite obvious everyone using simulated bob is getting that extra nudge then?

 

 

 

Sending a key is needed so that Vpinmame registers the tilt.    The bob should only be registering when there is hard enough event to tilt.     The digital plumb is NOT used for nudge action, it is only used for tilt.   There is separate code elsewhere for normal nudging. 

One could select a "nudge plugin" in the core scripts that does not register extra ball impact on keypress. 

I suspect nobody has really paid attention to that second nudge on a tilt, because you probably have to have been pretty violent in to trigger it.    Most people have a hard enough time even dialing the virtual tilt in, in the first place.  Using a real tilt bob is commonly recommended because the virtual one is too tough to configure and too affected by things like shakers and speakers.    

 

The imprecise polling of the joystick interface to read the accelerometer is one huge cause of the over-sensitivity to speakers/shakers.    I made a pretty good improvement to that by tweaking pinscape parameters, but it's far from perfect.   Using some kind of packet stream interface (even raw joystick HID events) to transmit the accelerometer data would help a lot.    MJR and I were both in agreement that it would help, but I don't think either of us have had the time to work to actually implement it. 

 

 

 

I just wonder why there's no-one responding in this thread  :(

 

I think MJR is the closest person we have to someone who really has much knowledge about how VPX nudging works, and he's not terribly active in VPX development these days.   The guy who did the current ball physics implementation (mukuste) has not been seen in a long time, and most of this code is otherwise really old stuff that pre-dates most of us.     Most of what I learned and did was just out of frustration trying to get it to mostly work on my own setup.   I'm not even much of a nudger on real pins, so I took it about as far as I wanted to go.

Since you seem to be savvy enough to read the C++ code I would encourage you to keep at it, there's probably lots of things you can do to improve the situation!  

 

Thanks for clarifications and for the general status info. Didn't really have a clue who's doing what.

 

I still don't quite understand what, where and why...

To clarify some basic tilt &  nudge terms as these have different names on UI, scripts and c++ code:

 

In VP key preferences UI we have 'Left Nudge', 'Center Nudge', 'Right Nudge' and 'Mechanical Tilt'.

In source code enums the equivalents for these are: 'eLeftTiltKey', 'eCenterTiltKey', 'eRightTiltKey' and 'eMechanicalTilt'.

In scripts there's 'CenterTiltKey' and also 'BangBack' (in vpmKeys). I'm quite sure both of these mean the same "center nudge key" that is [SPACE] by default.

 

Main question:
You said that the digital plumb is not used for any nudge action, but why is it sending the center tilt (= center nudge) instead of mechanical tilt key [T]? In my case pressing [T] does not cause this extra nudge effect, it just tilts like it should.

 

I'm using "NudgePlugIn_mjrAccelAndTilt.vbs" renamed to "NudgePlugIn" in VPX\scripts folder. I thought that should be enough. Weird thing is that at least earlier when experimenting if I placed that script in tables folder, it worked without fake nudge but having scripts there caused some other problems with certain tables.

In NudgePlugin there's a sub "DoNudge(angle, force)" but in source code there's "Nudge(angle, force)" and e.g. Attack From Mars table calls "Nudge(a,f)", not "DoNudge(a,f)" so how could Mjr's nudge script override it in any way?

 

Also I'm not sure how these external scripts are bound to each other, tables scripts and core code and in which order do they override each other.



#107 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 12 July 2019 - 03:43 PM

 

You said that the digital plumb is not used for any nudge action, but why is it sending the center tilt (= center nudge) instead of mechanical tilt key [T]? In my case pressing [T] does not cause this extra nudge effect, it just tilts like it should.

 

 

Unknown.  Sounds to me like it should probably be changed.  There was probably some historic reason but I can nearly assure you that the person who wrote it is not here to answer.   'T' may not have existed back then.   It might have been an early "crude" accelerometer implementation.   Change the code and see how it goes!    It wouldn't be the first time that something got fixed that's been broken for years.   :)

 

 

Also I'm not sure how these external scripts are bound to each other, tables scripts and core code and in which order do they override each other.

 

VP will check the current (probably tables) folder first, then try the scripts folder if it wasn't found.   It doesn't matter whether they're in Table or in Scripts, but we discourage people from putting scripts in the table folder as it results in people not replacing them correctly as updates come out.     See the "GetTextfile" function in pintable.cpp for reference, that's where the script hunting logic lives.     

The scripts all load their dependencies stemming from the controller.vbs include at the top of most VPX scripts.  Older tables used to more directly load the system-specific .vbs files which include core.


Edited by DJRobX, 12 July 2019 - 03:48 PM.


#108 sniiki

sniiki

    Enthusiast

  • Members
  • PipPipPip
  • 80 posts

  • Flag: Finland

  • Favorite Pinball: Attack from Mars

Posted 16 July 2019 - 05:56 PM

Had some trouble getting the source to compile until I realized to try r3746 instead of latest r3750.

I replaced the 'eCenterTiltKey' with 'eMechanicalTilt' in pininput.cpp line 827 and it seems to have sorted out the issue. I know I've said this before and I'm scratching my head if I've really just been "lucky" with some earlier fixes and during tests the ball has happened to be far enough from any object to avoid this extra nudge to make it fly all over, strange thing is that this must have happened several times in row.

 

Here's another video showing first what happens with the release code and after that with the mentioned change. Most noticeable ball bounce in 0:25.

 

https://youtu.be/_RujVX3-N_I


Edited by sniiki, 16 July 2019 - 06:04 PM.


#109 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,954 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 17 July 2019 - 12:15 AM

I don't understand how this can be. I see what you are saying and I agree. It looks like you found "your" problem. What surprises me is that with the change. It looks like your nudge works very close to what I have without special compile. Hope to see some response from the devs down the line.


Edited by Thalamus, 17 July 2019 - 01:29 AM.

From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#110 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 1,927 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 17 July 2019 - 12:58 AM

Not sure if this is still the case.... but I remember mentioning to Rob long ago that I noticed Analogue nudge (without a TILT Bob being used) would register TILT warnings on the "primary" game controller being used. However, I noticed that if you have a secondary controller plugged in....then the analogue nudge on it operates, but it will never EVER register a TILT warning no matter how hard you hit it or however many times you do it.

 

This "could" be a concern if someone uses more than one controller in their cabinet....and they may not be registering TILT warning....and not be as great a player as they think they are! :)

 

I'm not sure if this is still the case with newest VPX revisions....and if this was by design, or something forgotten. I found this out when testing on my desktop and had two xbox gamepads connected. I used the thumbstick as a tester for the nudge axis.


Edited by TerryRed, 17 July 2019 - 01:00 AM.


#111 sniiki

sniiki

    Enthusiast

  • Members
  • PipPipPip
  • 80 posts

  • Flag: Finland

  • Favorite Pinball: Attack from Mars

Posted 17 July 2019 - 05:30 AM

Not sure if what Terry mentioned is related to my issue as I have no problems getting the tilt to register but yeah, at least that would cause not noticing this one too if the bob isn't getting and forces registered.

I'm using pinscape and it's the only controller besides mouse and kb.

Edited by sniiki, 17 July 2019 - 05:36 AM.


#112 TouchMaster97

TouchMaster97

    Enthusiast

  • Members
  • PipPipPip
  • 153 posts

  • Flag: Netherlands

  • Favorite Pinball: Haunted House

Posted 12 August 2019 - 10:18 AM

Not really VPX related, but VP9's nudging feels too much like controlling the ball without tilt warnings. What can I do to make nudging feel more like a sudden jolt?







Also tagged with one or more of these keywords: vpx, nudge