Jump to content



Photo
- - - - -

KL52Z + Tilting - Can it be done with software?

kl52z nudge tilt bob accelerometer bumping nudging punching slapping beating

  • Please log in to reply
25 replies to this topic

#1 TallaNasty312

TallaNasty312

    Enthusiast

  • Platinum Supporter
  • 72 posts
  • Location:US and A

  • Flag: United States of America

  • Favorite Pinball: 1976 Bally Freedom, EM

Posted 09 August 2021 - 12:39 PM

Hello all,

 

I'm in the process of optimizing my VPX experience, and have yet to find a way to make machines tilt only using the KL52Z without a pendulum. Is there a way to make the the keyboard nudge register with 0% strength when the accelerometer is hit, while counting towards the "tilt warning?" I'm not afraid of unconventional approaches. 


Motherboard / CPU RAMMSI Z790 PRO Intel Core i7-12700K / Silicon Power 32GB DDR5 RAM (2x16GB) 4800 MT/s

Playfield MonitorLG 32GK650F-B 32" QHD, 144Hz, 2650x1440 (1440p)
GPURTX 3090 (24GB)


#2 tgx

tgx

    Enthusiast

  • Platinum Supporter
  • 309 posts

  • Flag: United States of America

  • Favorite Pinball: You mean today?

Posted 09 August 2021 - 05:14 PM

Hello all,

 

I'm in the process of optimizing my VPX experience, and have yet to find a way to make machines tilt only using the KL52Z without a pendulum. Is there a way to make the the keyboard nudge register with 0% strength when the accelerometer is hit, while counting towards the "tilt warning?" I'm not afraid of unconventional approaches. 

I would be interested in this also. It seems like the mechanical bits are all in place there's just nothing reading the values and passing relevant information to the table.

There probably needs to be some vpx code in the table script as well as the vpx binary.



#3 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 1,981 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 09 August 2021 - 05:56 PM

The problem may come from the fact that VPX 10.6 (not sure about 10,7) won't ever register a TILT when using analogue nudge on a "2nd / 3rd, etc" controller.

 

So if the KL25Z is your only controller, then it "should" work... but if you have additional controllers plugged in, then only one of them will register a TILT warning.



#4 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 09 August 2021 - 06:30 PM

Hello all,I'm in the process of optimizing my VPX experience, and have yet to find a way to make machines tilt only using the KL52Z without a pendulum. Is there a way to make the the keyboard nudge register with 0% strength when the accelerometer is hit, while counting towards the "tilt warning?" I'm not afraid of unconventional approaches. 

 

There's some information on the (somewhat convoluted) way that VP handles tilt and nudge, and a general outline of how to do what you want, here:

 

http://mjrnet.org/pi...de.php?sid=tilt

 

The scenario you have in mind isn't laid out specifically, since it's simpler (and I think better) to just add a physical tilt bob to the mix, but the basic thing you need to is to enable VP's "tilt sensitivity" option in the keyboard setup section, and then customize the nudge script to pass a tilt bob key press to the PinMame ROM.  "Tilt sensitivity" enables a simulated internal tilt bob that responds to the accelerometer input.  When the simulated tilt bob swings too hard, it sends a "central nudge" key input to the VP script (usually assigned to the space bar key). 

 

That'll do about 50% of the work.  The tricky part is the simulated tilt bob sends a nudge command to the script, but what you really want is a tilt key press to PinMame ROM.  For that part you have to modify the VP scripts.  VPX comes with a little add-in script I wrote a while back called NudgePlugIn_mjrAccelAndTilt.vbs that does something similar, but not quite this - my version of the script assumes you have a real tilt bob, so its whole point is just to pass the tilt bob key input to the PinMame ROM directly, without triggering an extra simulated nudge.  For your scenario, I think what you want to do is simply route "SPACE" key presses to the PinMAME ROM tilt key input.  I'm not sure what the best way to write that version of the script would be - I'd have to spend some time looking at the default VP scripts again to see how the nudge (space) key is wired up and what the right hook into that code is.  If you can figure it out, it would be great if you could post the working script.



#5 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 1,981 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 10 August 2021 - 07:28 AM

For those wondering about Future Pinball... it also doesn't register a TILT warning when using analogue nudge (digital works fine).

 

I show how to add a TILT bob function (to work with analogue nudge) to any FP table at this post here:

 

https://pinballnirva...33/#post-123366



#6 TallaNasty312

TallaNasty312

    Enthusiast

  • Platinum Supporter
  • 72 posts
  • Location:US and A

  • Flag: United States of America

  • Favorite Pinball: 1976 Bally Freedom, EM

Posted 10 August 2021 - 01:36 PM

 

Hello all,I'm in the process of optimizing my VPX experience, and have yet to find a way to make machines tilt only using the KL52Z without a pendulum. Is there a way to make the the keyboard nudge register with 0% strength when the accelerometer is hit, while counting towards the "tilt warning?" I'm not afraid of unconventional approaches. 

 

There's some information on the (somewhat convoluted) way that VP handles tilt and nudge, and a general outline of how to do what you want, here:

 

http://mjrnet.org/pi...de.php?sid=tilt

 

The scenario you have in mind isn't laid out specifically, since it's simpler (and I think better) to just add a physical tilt bob to the mix, but the basic thing you need to is to enable VP's "tilt sensitivity" option in the keyboard setup section, and then customize the nudge script to pass a tilt bob key press to the PinMame ROM.  "Tilt sensitivity" enables a simulated internal tilt bob that responds to the accelerometer input.  When the simulated tilt bob swings too hard, it sends a "central nudge" key input to the VP script (usually assigned to the space bar key). 

 

That'll do about 50% of the work.  The tricky part is the simulated tilt bob sends a nudge command to the script, but what you really want is a tilt key press to PinMame ROM.  For that part you have to modify the VP scripts.  VPX comes with a little add-in script I wrote a while back called NudgePlugIn_mjrAccelAndTilt.vbs that does something similar, but not quite this - my version of the script assumes you have a real tilt bob, so its whole point is just to pass the tilt bob key input to the PinMame ROM directly, without triggering an extra simulated nudge.  For your scenario, I think what you want to do is simply route "SPACE" key presses to the PinMAME ROM tilt key input.  I'm not sure what the best way to write that version of the script would be - I'd have to spend some time looking at the default VP scripts again to see how the nudge (space) key is wired up and what the right hook into that code is.  If you can figure it out, it would be great if you could post the working script.

 

 

Thank you both for the information. I've scoured that Pinscape document, but didn't end up getting it working as a result. I see that NudgePlugIn_mjrAccelAndTilt.vbs in my Scripts folder so I'll play around and see if I can find a solution. Will share if so!


Motherboard / CPU RAMMSI Z790 PRO Intel Core i7-12700K / Silicon Power 32GB DDR5 RAM (2x16GB) 4800 MT/s

Playfield MonitorLG 32GK650F-B 32" QHD, 144Hz, 2650x1440 (1440p)
GPURTX 3090 (24GB)


#7 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 11 August 2021 - 03:11 AM

I took a quick look at the VB scripts that handle nudge/tilt, and it looks to me like you should be able to get your scenario working simply by using my copy of the nudge plug-in - that is, go to your VB scripts folder, and rename NudgePlugIn_mjrAccelAndTilt.vbs to NudgePlugIn.vbs.  That script is really set up to work with a physical tilt bob, but if I'm reading things correctly, it should also work with VP's built-in simulated tilt bob.  The key is that the script does the main thing I mentioned that you'd have to do - it translates a key press on VP's "Center Nudge" key, usually mapped to the Space Bar key, to a simulated pulse input on VPinMame's tilt switch.  The last I looked, when VP's simulated tilt bob is enabled (via the Tilt Sensitivity setting in the VP keyboard options dialog), it sends a Center Nudge key to the script when the simulated tilt bob detects too strong of an accelerometer input.  So the plug-in script is doing just what you want - it translates the simulated tilt condition to a VPM tilt switch pulse, letting the ROM know that the tilt bob triggered.

 

There are a lot of moving parts here, and it's all kind of jury-rigged, so I could easily be missing something.  If you give it a try, let me know if you have any luck - I'd like to add a mention of this to the build guide if it actually works.


One quick test you could perform to make sure the script is working would be to simply press the Space Bar key while playing.  That should immediately trigger a tilt warning message in the ROM, as though the physical tilt bob fired, without generating any simulated physics nudging.  If that much is working, and your accelerometer is generating physics effects in the game, that leaves only the VP simulated tilt bob (the Tilt Sensitivity thing) as the troubleshooting focus if it's not working overall.



#8 TallaNasty312

TallaNasty312

    Enthusiast

  • Platinum Supporter
  • 72 posts
  • Location:US and A

  • Flag: United States of America

  • Favorite Pinball: 1976 Bally Freedom, EM

Posted 11 August 2021 - 09:09 PM

I took a quick look at the VB scripts that handle nudge/tilt, and it looks to me like you should be able to get your scenario working simply by using my copy of the nudge plug-in - that is, go to your VB scripts folder, and rename NudgePlugIn_mjrAccelAndTilt.vbs to NudgePlugIn.vbs.  That script is really set up to work with a physical tilt bob, but if I'm reading things correctly, it should also work with VP's built-in simulated tilt bob.  The key is that the script does the main thing I mentioned that you'd have to do - it translates a key press on VP's "Center Nudge" key, usually mapped to the Space Bar key, to a simulated pulse input on VPinMame's tilt switch.  The last I looked, when VP's simulated tilt bob is enabled (via the Tilt Sensitivity setting in the VP keyboard options dialog), it sends a Center Nudge key to the script when the simulated tilt bob detects too strong of an accelerometer input.  So the plug-in script is doing just what you want - it translates the simulated tilt condition to a VPM tilt switch pulse, letting the ROM know that the tilt bob triggered.

 

There are a lot of moving parts here, and it's all kind of jury-rigged, so I could easily be missing something.  If you give it a try, let me know if you have any luck - I'd like to add a mention of this to the build guide if it actually works.


One quick test you could perform to make sure the script is working would be to simply press the Space Bar key while playing.  That should immediately trigger a tilt warning message in the ROM, as though the physical tilt bob fired, without generating any simulated physics nudging.  If that much is working, and your accelerometer is generating physics effects in the game, that leaves only the VP simulated tilt bob (the Tilt Sensitivity thing) as the troubleshooting focus if it's not working overall.

 

Well my day-occupation involves a lot of software testing and logging, so expect to hear something soon. :)


Motherboard / CPU RAMMSI Z790 PRO Intel Core i7-12700K / Silicon Power 32GB DDR5 RAM (2x16GB) 4800 MT/s

Playfield MonitorLG 32GK650F-B 32" QHD, 144Hz, 2650x1440 (1440p)
GPURTX 3090 (24GB)


#9 TallaNasty312

TallaNasty312

    Enthusiast

  • Platinum Supporter
  • 72 posts
  • Location:US and A

  • Flag: United States of America

  • Favorite Pinball: 1976 Bally Freedom, EM

Posted 11 August 2021 - 10:51 PM

It has been confirmed-

 

Your script works with the simulated tilt bob, and it worked without a hitch! I did lower my Nudge Threshold and increase my Tilt Multiplier (Pinscape Controller Settings), and played around with the Tilt Sensitivity but that's nothing. The space bar test also yields a tilt warning.

 

Test was performed in 10.7 Rev. 270.

 

Guess you're better at VBS than you thought, haha!


Edited by TallaNasty312, 11 August 2021 - 10:54 PM.

Motherboard / CPU RAMMSI Z790 PRO Intel Core i7-12700K / Silicon Power 32GB DDR5 RAM (2x16GB) 4800 MT/s

Playfield MonitorLG 32GK650F-B 32" QHD, 144Hz, 2650x1440 (1440p)
GPURTX 3090 (24GB)


#10 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 11 August 2021 - 11:40 PM

Your script works with the simulated tilt bob, and it worked without a hitch! I did lower my Nudge Threshold and increase my Tilt Multiplier (Pinscape Controller Settings), and played around with the Tilt Sensitivity but that's nothing. The space bar test also yields a tilt warning.

 

That's great!  Thanks for trying it out and letting me know.  I'll have to add a note to the script and build guide about this setup - it's nice to have the option if you don't have room for a physical tilt bob or just want to keep the mechanical parts simpler.



#11 WimK

WimK

    Hobbyist

  • Members
  • PipPip
  • 23 posts
  • Location:Khon Kaen

  • Flag: Thailand

  • Favorite Pinball: Rockmakers

Posted 19 August 2021 - 02:31 AM

I use a brushless gimbal. It sends all the data about the position and the nudges from the cabinet. For tilt I use a classic bob.

The gimbal PCB is an AlexMos Brushless Gimbal Controller (SImpleBGC 8 bit) normally used for steadycams.



#12 TallaNasty312

TallaNasty312

    Enthusiast

  • Platinum Supporter
  • 72 posts
  • Location:US and A

  • Flag: United States of America

  • Favorite Pinball: 1976 Bally Freedom, EM

Posted 07 October 2021 - 11:13 AM

So an update on the KL52Z "soft tilting":

 

In the past few weeks, the tilting with my KL52Z stopped working somewhere along the way. Not exactly sure what day it happened, but it dawned on me upon giving my cab a hard slap (with a strong pimp hand, but I did not break the cabinet in half). No tilt warning was received as had happened for a while after implementing the script.

 

The build of VPX 10.7 was updated from Rev. 270 to 310rc so it's possible that had something to do with it. Pressing the space bar still yields a tilt warning. I'm gonna troubleshoot this later today and try to track down other VPX/Virtuapin Controller related changes as well.


Motherboard / CPU RAMMSI Z790 PRO Intel Core i7-12700K / Silicon Power 32GB DDR5 RAM (2x16GB) 4800 MT/s

Playfield MonitorLG 32GK650F-B 32" QHD, 144Hz, 2650x1440 (1440p)
GPURTX 3090 (24GB)


#13 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 08 October 2021 - 08:16 AM

So an update on the KL52Z "soft tilting":

 

In the past few weeks, the tilting with my KL52Z stopped working somewhere along the way. Not exactly sure what day it happened, but it dawned on me upon giving my cab a hard slap (with a strong pimp hand, but I did not break the cabinet in half). No tilt warning was received as had happened for a while after implementing the script.

 

The build of VPX 10.7 was updated from Rev. 270 to 310rc so it's possible that had something to do with it. Pressing the space bar still yields a tilt warning. I'm gonna troubleshoot this later today and try to track down other VPX/Virtuapin Controller related changes as well.

 

I do not think the latest 10.7 builds are nudging properly
they are not for me, analog nudge that is, digital nudge is fine

Analog nudge does not hardly move untill turned way up and they it only nudges one direct, UP

no matter which way you are nudging.

 

I reported it in the beta thread


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#14 TallaNasty312

TallaNasty312

    Enthusiast

  • Platinum Supporter
  • 72 posts
  • Location:US and A

  • Flag: United States of America

  • Favorite Pinball: 1976 Bally Freedom, EM

Posted 09 October 2021 - 03:53 PM

Reverting back to the 10.7 R270 backup made the virtual tilt bob and nudging register in the "Nudge Calibration table."


Motherboard / CPU RAMMSI Z790 PRO Intel Core i7-12700K / Silicon Power 32GB DDR5 RAM (2x16GB) 4800 MT/s

Playfield MonitorLG 32GK650F-B 32" QHD, 144Hz, 2650x1440 (1440p)
GPURTX 3090 (24GB)


#15 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 10 October 2021 - 03:34 AM

Reverting back to the 10.7 R270 backup made the virtual tilt bob and nudging register in the "Nudge Calibration table."

 

Yea i dont know what happened to it, i am sure they will find out though


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#16 mathygreen

mathygreen

    Neophyte

  • Members
  • Pip
  • 1 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

Posted 28 October 2021 - 08:23 PM

I took a quick look at the VB scripts that handle nudge/tilt, and it looks to me like you should be able to get your scenario working simply by using my copy of the nudge plug-in - that is, go to your VB scripts folder, and rename NudgePlugIn_mjrAccelAndTilt.vbs to NudgePlugIn.vbs.

 

That script is really set up to work with a physical tilt bob, but if I'm reading things correctly, it should also work with VP's built-in simulated tilt bob.

 

The key is that the script does the main thing I mentioned that you'd have to do - it translates a key press on VP's "Center Nudge" key, usually mapped to the Space Bar key, to a simulated pulse input on VPinMame's tilt switch.

 

The last I looked, when VP's simulated tilt bob is enabled (via the Tilt Sensitivity setting in the VP keyboard options dialog), it sends a Center Nudge key to the script when the simulated tilt bob detects too strong of an accelerometer input.

 

So the plug-in script is doing just what you want - it translates the simulated tilt condition to a VPM tilt switch pulse, letting the ROM know that the tilt bob triggered.

 

There are a lot of moving parts here, and it's all kind of jury-rigged, so I could easily be missing something.

 

If you give it a try, let me know if you have any luck - I'd like to add a mention of this to the build guide if it actually works.

 

One quick test you could perform to make sure the script is working would be to simply press the Space Bar key while playing.

 

That should immediately trigger a tilt warning message in the ROM, as though the physical tilt bob fired, without generating any simulated physics nudging. If that much is working, and your accelerometer is generating physics effects in the game, that leaves only the VP simulated tilt bob (the Tilt Sensitivity thing) as the troubleshooting focus if it's not working overall.



#17 doroki

doroki

    Neophyte

  • Members
  • Pip
  • 1 posts

  • Flag: Argentina

  • Favorite Pinball: 6

Posted 02 November 2021 - 06:00 PM

interesting software you develop. I have interest in making some gaming apps for mobile phone users. I have already got contact to mobile app development services. Because I need to used help of professionals. 


Edited by doroki, 05 November 2021 - 07:14 AM.


#18 vpxpinball

vpxpinball

    Neophyte

  • Members
  • Pip
  • 5 posts

  • Flag: United States of America

  • Favorite Pinball: space invader

Posted 25 January 2022 - 07:23 AM

just wondering how to get into the pinscape setting to change the threshold settings and tilt multiplier. Would it be in the setting tab or buttons tab. cant seem to find it ,any help here would be greatly appreciated.



#19 LynnInDenver

LynnInDenver

    Pinball Fan

  • Members
  • PipPipPipPip
  • 570 posts
  • Location:Denver

  • Flag: United States of America

  • Favorite Pinball: Genie

Posted 25 January 2022 - 12:39 PM

I think the threshold and tilt is controlled through a combination of VPX (for how much nudging activates the virtual tilt bob) and table ROM (number of tilt warnings). Note that some tables don't have a tilt warning setting, typically the earliest solid state tables and EMs, once the tilt bob connects, that's it.



#20 DilanKingsman

DilanKingsman

    Neophyte

  • Members
  • Pip
  • 5 posts

  • Flag: United Kingdom

  • Favorite Pinball: Willy Wonka and the Chocolate Factory

Posted 13 May 2022 - 02:54 PM

 

Hello all,I'm in the process of optimizing my VPX experience, and have yet to find a way to make machines tilt only using the KL52Z without a pendulum. Is there a way to make the the keyboard nudge register with 0% strength when the accelerometer is hit, while counting towards the "tilt warning?" I'm not afraid of unconventional approaches. 

 

There's some information on the (somewhat convoluted) way that VP handles tilt and nudge, and a general outline of how to do what you want, here:

 

http://mjrnet.org/pi...de.php?sid=tilt

 

The scenario you have in mind isn't laid out specifically, since it's simpler (and I think better) to just add a physical tilt bob to the mix, but the basic thing you need to is to enable VP's "tilt sensitivity" option in the keyboard setup section, and then customize the nudge script to pass a tilt bob key press to the PinMame ROM.  "Tilt sensitivity" enables a simulated internal tilt bob that responds to the accelerometer input.  When the simulated tilt bob swings too hard, it sends a "central nudge" key input to the VP script (usually assigned to the space bar key). 

 

That'll do about 50% of the work.  The tricky part is the simulated tilt bob sends a nudge command to the script, but what you really want is a tilt key press to PinMame ROM.  For that part you have to modify the VP scripts.  VPX comes with a little add-in script I wrote a while back called NudgePlugIn_mjrAccelAndTilt.vbs that does something similar, but not quite this - my version of the script assumes you have a real tilt bob, so its whole point is just to pass the tilt bob key input to the PinMame ROM directly, without triggering an extra simulated nudge.  For your scenario, I think what you want to do is simply route "SPACE" key presses to the PinMAME ROM tilt key input.  I'm not sure what the best way to write that version of the script would be - I'd have to spend some time looking at the default VP scripts again to see how the nudge (space) key is wired up and what the right hook into that code is.  If you can figure it out, it would be great if you could post the working script.

 

The union of help capacities in the SSC permits organizations to zero in on center business, which is beneficial, and to commit additional opportunity to the essential advancement of the venture. Normalization and mechanization of business processes emphatically affect the nature of inward administrations. This approach permits you to keep away from blunders during the time spent handling demands, diminish the time spent on the assignment, and increment the efficiency of representatives. This, accordingly, can fundamentally lessen the business cost for working exercises>> ssc means


Edited by DilanKingsman, 17 May 2022 - 09:55 AM.






Also tagged with one or more of these keywords: kl52z, nudge, tilt, bob, accelerometer, bumping, nudging, punching, slapping, beating