Code/Example BAM Simulate Newton Balls with BAM

Coding and examples for future Pinball and BAM

Wecoc

Pinball Wizard
Joined
Dec 7, 2021
Messages
80
Reaction score
124
Points
40
Favorite Pinball Machine
Cirqus Voltaire
In pinball, Newton balls are captive balls that are static. (More so, usually they are in fact metal pegs in the shape of a ball.) When the player's ball hits them, that force passes through the Newton ball to the other side, typically pushing a non-static captive ball.

image-18.jpg

Newton ball in Breakshot (Image from IPDB)

image-2.jpg

Three Newton balls and a movable captive ball in Pokerino (Image from IPDB)

newtonball1.png

Newton ball with a target instead of a captive ball, in Iron Maiden Legacy of the Beast (Image from IPDB)

In Future Pinball, this effect is often recreated using two normal captive balls, but in that case none of them is static; both move back in contact with the player's ball, which is not very realistic. Furthermore, some variants exist of the Newton ball, for example a smaller static ball placed over a little peg.

Using BAM, you can use a trigger in the shape of a ball and some code to get a more realistic effect.

Note: This would normally be made with a target, but the trigger allows sphere mapping, so it's preferable in this case. Apart from that, they both work the same way.

The concept is very simple. When the trigger is hit by the player's ball, BAM reads the current angle and force (ball speed) of that hit and converts it to a resulting angle and force that will be applied to the captive ball.

Note: Even though it is spherical, the angle of the trigger ball is still important when placing it on the editor, since that is used in the code. The angle should match the face where the player ball will hit the trigger.

This concept can be easily applied to other kinds of "Newton objects" that will act basically the same way, like a rail or a rubber. For the rubber case, an invisible wall can be used instead of the trigger.

newtonball2.png

Newton wire in Mr. Evil, which works exactly like a Newton ball

You can see an example of Newton rubber in the pinball Space Riders.

I made a demo that includes a Newton ball and the wire and rubber variants. Apart from the "mathsy" stuff (which shouldn't require any changes), you should find the code pretty intuitive ;)
 

Attachments

  • NewtonBallsDemo.fpt
    419.5 KB · Views: 18
Last edited:
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Quote
  • xenonph @ xenonph:
    I sent you message with pic showing where to make visible adjustment.
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    Pinped has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    daleks12 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Stephen has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    docdoc has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Exnihilo_Mundus has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    angmarg52 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    tully619 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    smorndb has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tech49 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Topsi Klaus has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Forsaken43 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    duduky72 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Gerge has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    nunolilo has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    DavidT2025 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Gary-7 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Thunderbird has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    alug has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    bluebird has left the room.
  • HZR @ HZR:
    It’s nice to go all see a place I can play actual machines!!!!
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    Sunrise74 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Rai has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    liebowa has left the room.
      Chat Bot Mibs Chat Bot Mibs: liebowa has left the room.
      Back
      Top