Building a pinball game in Unreal Engine 4: physics-driven ball behavior, flipper mechanics, spline-guided bumpers, particle systems, decals, and score UI — taught step by step in Spanish.
This project is a pinball game prototype built entirely in Blueprints with Unreal Engine 4, developed without following a specific course. The development playlist was recorded in Spanish. Pinball is one of the most physics-demanding game genres — the entire experience depends on a ball behaving with precise, predictable physics across a complex playfield — making it an excellent vehicle for understanding how to configure Unreal’s physics engine for gameplay-critical simulation.
You can watch the complete teaching playlist here (in Spanish): YouTube Playlist
You can also watch a demo here: YouTube
Physics Configuration for Pinball
Pinball’s physics requirements are more demanding than most game genres. The ball must respond consistently to every surface — angled bumpers redirect it at precise angles, flippers launch it at repeatable velocities, and the playfield’s incline gives it a constant gravitational pull toward the drain. Any inconsistency in the physics simulation reads immediately as a broken game.
The key physics parameters for a pinball ball are restitution (bounciness) — how much energy the ball retains after a collision. A restitution of 1.0 is perfectly elastic (no energy loss); lower values produce realistic damping. Pinball balls are highly elastic — a real pinball table has very little energy loss per bounce — so the restitution value needs to be tuned close to 1.0 without going over, which would produce exponentially increasing bounce energy. Friction between the ball and playfield surface determines whether the ball rolls or slides — for a smooth metal ball on a smooth playfield, friction is low. Mass determines how the ball responds to impulse forces from the flippers and bumpers.
The playfield itself is tilted — in a real pinball machine, the table slopes toward the player at a few degrees, giving the ball a constant gravitational component pulling it toward the drain. In Unreal, this tilt is achieved either by rotating the playfield geometry or by modifying the gravity vector for the ball’s physics body.
Flipper Mechanics
The flippers are the player’s only direct interaction with the ball, making their feel the most critical tuning challenge in the game. A flipper must:
- Respond instantly to input with no perceptible lag
- Rotate through a fixed arc at a consistent speed
- Apply a well-defined impulse to the ball at the moment of contact
- Return to its resting position smoothly when input is released
In Unreal, flippers are implemented as physics-constrained actors — a hinge constraint limits their rotation to the flipper arc, and an angular motor drives the rotation in response to player input. The motor’s strength and speed determine how fast the flipper rotates and how much force it can exert against a ball that’s resting on it. Getting the motor parameters right so the flipper feels snappy without being instantaneous is the primary feel tuning challenge.
The impulse applied to the ball when the flipper makes contact is determined by the flipper’s angular velocity at the moment of impact and the ball’s position along the flipper length. A ball hit at the tip of the flipper flies farther than one hit at the base — the same relationship as hitting a baseball at the end of the bat versus the handle. This spatial variation in launch power is an inherent property of the physics simulation when configured correctly.
Splines for Playfield Guides
Splines define the curved guide rails and channels that direct the ball’s path through the playfield. Rather than modeling complex curved geometry for each guide, spline mesh actors follow a configurable spline path — the curve is defined by the spline’s control points, and the mesh conforms to it automatically. This makes the playfield design highly iterative: adjusting a control point reshapes the guide without requiring mesh editing.
The ball interacts with spline guide meshes via their collision geometry, which must be configured to match the visual shape closely enough that the ball tracks through the guide smoothly. Overly simplified collision on a curved guide produces visible pops where the ball jumps between collision faces; too-dense collision is computationally expensive. Capsule or convex hull collision shapes provide a good balance for curved guide geometry.
Bumpers
Bumpers are circular obstacles that apply a radial impulse to the ball on contact — launching it away from the bumper’s center. In Unreal, this is implemented as a sphere overlap that fires when the ball enters the bumper’s radius, applies an outward impulse (AddImpulse in the direction away from the bumper center), plays a hit animation and sound, and increments the score.
The bumper’s impulse magnitude is the primary tuning parameter — too weak and the ball barely reacts; too strong and the ball becomes uncontrollable in a dense bumper cluster. The visual feedback — a brief scale pulse on the bumper mesh — communicates the hit clearly and adds the tactile “pop” that bumpers are known for.
Score System and UI
The score system tracks hits on bumpers, targets, and special elements, with each element type contributing a configurable point value. The UI displays the current score prominently using a UMG widget that updates reactively on each score event. Pinball score displays traditionally use large, high-contrast numbers — the design of the score UI follows this convention, making the score readable at a glance without taking visual attention from the playfield.
High score persistence uses the Save Game system — the player’s best score is saved between sessions and displayed alongside the current score, creating the retry motivation that pinball’s loop depends on.
Particle Systems and Decals
Particle systems fire on bumper hits, flipper launches, and when the ball passes through special score zones — brief bursts of light that reinforce the physical events with visual feedback. For pinball specifically, the particle effects don’t need to be elaborate — their purpose is timing feedback rather than atmosphere, so a quick flash of colored particles at the correct moment is more valuable than a complex extended effect.
Decals add surface detail to the playfield — score zone markings, decorative graphics, impact scuff marks from repeated ball contact. They’re placed as deferred decal actors that project their texture onto the playfield surface without requiring custom geometry, keeping the playfield mesh simple while still having rich visual detail.
Fixed Camera
The pinball camera is a fixed overhead perspective — positioned at a specific angle above the playfield and not adjustable by the player. This is the correct camera for pinball because the game’s spatial reading depends on consistent orientation: the player always knows which direction the flippers are, where the drain is, and how the playfield is laid out. A movable camera would destroy this spatial consistency.
The camera angle is a design decision: too steep (nearly top-down) flattens the playfield’s depth and makes it harder to read the ball’s trajectory; too shallow makes the upper playfield hard to see. A classic pinball camera angle of roughly 60-70 degrees from horizontal provides good playfield visibility while preserving depth cues.
Reflection
Pinball is the most mechanically demanding project in the early part of this series. Unlike the other physics projects — the Marble Run and the Crystal Cavern — pinball has a reference that every player knows: a real pinball machine. Any deviation from expected behavior is immediately perceived as wrong, which makes the physics tuning work unusually demanding. There’s no room to design around the physics; the physics must be right.
Building this project without a course — designing the playfield layout, tuning every physics parameter from scratch — was the most iterative development process in the series. Pinball teaches the lesson that physics configuration is design work, not just technical setup. Every parameter change is a design decision that changes how the game feels and plays. That lesson — that technical parameters are design parameters in a physics-driven game — carries directly into every subsequent physics project.
Leave a comment