Die Hard Trilogy¶
VPW original table inspired by the Die Hard film trilogy, featuring a roguelike pinball design philosophy (beatable game with no repeats), PUP DMD integration with villain select system, mirror backwall reflections, and 3D animated toys (Nakatomi tower, airplane, taxi). Development spanned 2021 through 2024 with contributions from astronasty, mysda (Dapheni), fluffhead35, donkeyklonk (Wizball), oqqsan, cyberpez, scampa123, friscopinball, iaakki, rawd, and others.
Build Notes¶
Whitewood-First Development¶
For original tables, the development order is: whitewood (layout) first, then playfield art and game code in parallel. Do not bother coding gameplay until the whitewood is done. Get the flow, shots, and mechs working first. Use VPX ramps and walls to get everything playable before making 3D models.
Third Flipper Addition¶
Added a third flipper after the two-flipper design felt uninspired. Inspired by Demolition Man's layout approach. The upper playfield area was redesigned multiple times, with pop bumper placement being a key consideration -- replacing 3 bumpers with 1 center pop + slings/rubber bands saved space and was functionally equivalent.
Building Ramp Shot Fix -- Wedge Deflector¶
The Nakatomi tower ramp shot was consistently bouncing off the building toy. Fix: added a wedge-shaped deflector primitive above the ramp entrance to push the ball downward. Also discovered a wall sticking up through the ramp causing erratic behavior. The building was made with rounded openings (like Godzilla).
VUK and Kicker in Tower¶
Created a dual-purpose mechanism: a VUK for ball lock and a regular kicker for normal play. KickXYZ(angle, speed, inclination, x, y, z) -- for vertical kick, 90-degree value goes in the third argument (inclination). Speed of 10 is too slow for a VUK; use 40-60. Position the ball far enough from the kicker to prevent re-suction.
Physical Trough and Subway¶
Implement a physical trough and subway instead of destroying balls. A playfield mesh is needed with outlines on the playfield image showing where subway and saucer holes go. Press Start button to release ball into plunger lane.
Collidable Ramp in Blender¶
When VPX native ramps cause ball rejection (especially merged/split ramps), build a low-poly collidable ramp in Blender as a single mesh. This solved constant rejection on the upper right split ramp.
Table Height Geometry¶
Table geometry being too flat is a common early problem. Raise the main ramp + upper PF significantly to leave space for vault ejection. Use nudge keys to view table from angles during development to evaluate height.
Playfield Art for 4K¶
For 4K cabinet displays, make playfield image 2160 pixels wide. Art direction: entire playfield should look silk-screened with solid colors and no shading (classic pinball aesthetic).
Scripting¶
Player State Management¶
Major cleanup pattern: many things that should be player state were either global state or tied to light state. Fixes included proper lifecycle management (more than 1 game playable without resetting), correct ball-in-play count when locks empty, proper flipper disable after game over, and preventing shots from registering unless game is playing.
PUP DMD Video Normalization¶
All videos in a PUP pack must be encoded the same way or PUP will crash. Use batch normalization scripts to ensure consistent encoding. Rip Blu-rays at 1080p (higher source preferred for downscaling). 720p scaled up looks worse than 1080p scaled down.
PUP DMD JSON Tags¶
PUP's SetLabel with PNGs requires the path as "pupalpha\\file.png" with height and width specified. JSON tags support: outline, z-order, color changes, position, alignment, font shadows, PNG overlays. Z-order is critical -- labels need correct z-order to appear over backgrounds.
PUP Video Priority System¶
Higher priority videos interrupt lower priority ones. Design: Holly letter flashes = low priority (skippable), extra ball/multiball = high priority (999, plays to completion), drain = highest priority (1000, stops everything). Keep videos short (2-3 sec for minor events, 8 sec for MB starts).
PUP Villain Select Architecture¶
PUP handles villain selection visually using flipper buttons for left/right navigation. PUP code tracks which villain and mode is selected, then calls a VBScript sub to trigger gameplay.
PUP Health Bar Implementation¶
Karl villain mode uses dual health bars. Implementation: 12 degrees per bar (13 = beaten). Two timers: one for McClane countdown, one to check Karl hit count. Visual design: Super Punch Out-style horizontal bars with pixel art character faces.
Custom Light Control System¶
Framework with SetState(lightNr, state, interval, pattern) and SetLightColor(lightNr, newColor). Mass blink sequences: BLS startLight, endLight, blinks, timeOn, timeOff, delay. Lights must be named Light001 and up sequentially.
Script Organization¶
Set up a table of contents at the top of the script with searchable tags. Establish a GameState class for the framework. Keep PUP code in a dedicated script section (ZPUP) for clean merges.
Debug Routines¶
Use a debugger routine that writes output to a file from the very start of development. Simple Label:Message format. Also includes a shot debugger (press 2 to bring up blocker walls) and cheat commands for wizard mode testing.
Flipper EOS Torque for Post Passes¶
If flippers are not falling fast enough for post passes and backhands, check EOS Torque. The left flipper was set to 0.125 when it should be 0.275.
DOF Issues with Custom controller.vbs¶
DOF not working was traced to custom controller.vbs code embedded in the table script with outdated registry settings. Fix: load controller.vbs from the scripts folder instead.
3D & Art¶
Mirror Backwall Reflection Technique¶
Mirrored lightmapped objects behind the backwall. Key details:
- Mirrored playfield primitives need to match the VPX playfield slope angle (6 degrees)
- Ball positions in mirrored area need the slope applied too
- Use render probe roughness to control mirror blur: value of 1 for mirror surface, 5-10 for depth panels
- Remove faces from mirrored parts not visible from POV for performance
- iaakki created a tutorial: "Die Hard VPX Mirror backwall dev"
Vault Toy Animation¶
Animated Nakatomi vault that rotates open. The vault door extends outside the table boundary when open -- cabinet walls cover this. Designed as primarily a bash toy (opens once per game for super multiball).
Building Toy with Internal Flashers¶
Nakatomi building designed as vacuum-formed plastic look. Upper sections have cutouts on all 4 sides so internal flashers shine through, simulating the building exploding.
Backglass Design for Multi-Screen¶
Separate backglass versions for 2-screen and 3-screen setups. For 2-screen B2S, the DMD cutout area MUST be transparent (not black). ON/OFF versions needed for GI-tied effects.
Data East Era Aesthetic¶
Deliberate design choice: no 3D animations on DMD ("too fancy, doesn't fit the era"), 2D animations only, movie poster style for LCD overlay, old-school instructions text directly on playfield. Themed high score titles: "Yippie Ki Yay Champion", "Detective Lieutenant", "Beat Cop."
Insert Overlay Color Coding¶
- Red = bad/negative (ambush, failed). Do not use red for positive collectibles.
- Yellow/Orange = in progress (hitting drop targets toward multiplier)
- Green = complete/collected
- White = neutral/available
- Pop bumper insert can be red (thematic exception for explosions)
Troubleshooting¶
Playfield Mesh Z-Position Causes Flickering¶
Flickering playfield ball reflections caused by playfield_mesh at approximately -9 on Z axis instead of 0. Fix: export mesh to its own layer, reimport and reset coordinates to 0,0,0 and size to 1,1,1. The export-reimport trick automatically sets origin to 0,0.
PUP-Related Micro Stuttering¶
Potential causes: always updating scores in PUP update routine (only update on change), using clear.png instead of visibility toggle, PUP logging on non-SSD drives, Windows Real-Time Protection re-enabling itself. Test by removing PUP folder entirely to isolate.
Windows Real-Time Protection¶
Can cause micro stuttering even when FPS counter shows stable frame rates. It turns itself back on automatically after being disabled.
VPX Editor Renames Table Object¶
A VPX editor bug can accidentally rename "Table1" (e.g., to "Wall013001") through a dialog popup when selecting and copying an object's name. Fix: rename back to "Table1" in main preferences.
Static Rendering Flag Causing Black Inserts¶
Insert primitives turn black when static rendering flag is set. Works in F6 but not F5. Fix: remove the static flag from off-state insert primitives.
Wizard Mode Extra Ball Bug¶
When a player starts wizard mode with an extra ball queued, the game continues after the ending screen. Fix: add Player(CurrentPlayer).ExtraBalls = 0 to wizard mode start.
Game Knowledge¶
Roguelike Pinball Design¶
Die Hard Trilogy uses roguelike video game design principles:
- Table is beatable -- there is an ending
- No repeat missions or multiballs
- Once a mission is complete, it is done
- No right outlane (only left drain + center)
- Die Harder option: risk losing a ball for bonus points per villain
- Flippers go dead on fail in Die Harder mode
- Bullets reset completely on drain
Rules Architecture¶
- 5 villain fights (Hans Gruber, Simon Gruber, Colonel Stuart, Karl Vreski, Katya) each with unique objectives and permanent buff reward
- 3 multiballs (Building physical lock, Plane virtual lock, Taxi cab)
- Ammo system: 15-round magazine fills by shooting lanes/ramps, full clip required to start villain
- Wizard mode: Multi-phase structure corresponding to three films, requires beating all 5 villains
- Vault Super Multiball: Requires completing all 3 regular MBs
DMD Design Philosophy¶
"The DMD is about delivering information, not focusing on assets. Assets are there as a background." Text overlays should be large, easy to read, and styled like movie posters. Readability trumps visual complexity.
Resources¶
- Daphishbowl PUP Dev Docs -- Collection of PUP DMD JSON tags and undocumented features
- PinUp Custom Layout: https://www.nailbuster.com/wikipinup/doku.php?id=pinup_pack_layout