Skip to content
c-f-h edited this page Apr 22, 2014 · 12 revisions

VP 10 has a completely overhauled and much more realistic physics engine. The main new features are the following:

  • Physics framerate raised from 100 Hz to 1000 Hz. This increases the smoothness, accuracy and stability of the physics simulation.
  • Physics now always use a fixed timestep. This eliminates all FPS dependence of the physics code and makes smooth gameplay at vsynced framerates possible.
  • Proper simulation of ball spin. All rotational effects are fully simulated: the ball will properly pick up spin from moving over the playfield and other objects, and collisions with playfield objects will take the spin into account to deflect the ball properly.
  • Simulation of friction on contact and collisions. This goes hand in hand with the previous point since friction with the playfield is the main source of ball spin, and frictional effects during collisions cause the ball to deflect according to spin. In particular, the ball will now properly transition from sliding over the playfield to rolling on it. This means that it will first convert some translational kinetic energy into rotational energy until it enters a natural roll, at which point friction doesn't do much anymore and the ball is free to roll. The stored up rotational energy has the effect that the ball needs a bit more force put into it to get it to move or stop it again.
  • Flippers have been pretty much rewritten from scratch. They are now simulated as true dynamic rigid bodies which have forces from the solenoid, the return spring and the ball acting on them and accelerate accordingly. They will also properly bounce off their stoppers instead of just moving to maximum extension and then stopping. In practice, this means that flipper/ball interaction is now much more realistic and less binary. Post passes, light taps, cradle separations, drop and live catches are now all possible. Furthermore, the simulation of the friction of the flipper rubbers greatly improves aiming, and all shots on the playfield (including center shots and backhands) are immediately attainable.

Flipper parameters

Mass

This is the mass of the flipper (where 1 corresponds to standard ball mass, 80g). It basically describes how much the flipper interacts with the ball. A very heavy flipper will barely feel the impact of the ball and keep moving at almost the same velocity as it was before the hit. A very light flipper, on the other hand, will move much slower with the ball on it than it does without the ball, and will be deflected by the impact of the ball significantly.

A good default value for this parameter is 1 - 1.25.

Strength

This is the force (actually, torque) with which the solenoid accelerates the flipper. The higher this value, the faster the flipper will move. But be aware that this is directly linked to flipper mass: if the flipper is twice as heavy, it also needs twice the force to get it to move at the same speed.

A reasonable range for this is 1000-3000, obviously depending a lot on the era of flippers being simulated and the desired speed of the game.

Return Strength Ratio

This is the force of the return spring which pulls the flipper back down. For instance, if this is at 0.10, the force of the return spring will be 1/10th of that of the solenoid. Due to how acceleration and velocity work, the time the flipper needs to return to its home position is about three times longer than that for the forward stroke in this example (square root of 10, to be precise).

If you make this smaller, not only will the flipper return slower, but it will also pick up less speed if you briefly release the flipper and then press it again since it has less time to accelerate. A smaller value therefore makes it easier to do flipper tricks which involve light taps, such as cradle separations and flick passes.

Try the range 0.07-0.10 to start with and experiment from there.

Elasticity

This is basically the bounciness of the flipper rubber. There's a twist, however: real rubber is less bouncy when it is hit at a higher velocity. Therefore, the elasticity is decreased when the ball hits the flipper at higher velocities. The exact amount of this falloff will be configurable in the future.

Good defaults for this value seem to be 0.8-0.9.

Friction

This is how much the rubber "grips" the ball. It turns out that this value is very important for making shots close to the center of the playfield possible with a moving ball, as well as enabling backhands. In general it affects the aiming on all shots, but also makes a spinning ball deflect off the flipper in the proper direction.

A good default seems to be 0.8.

Clone this wiki locally