Skip to content

Diner

VPW build of Williams' 1990 Diner, featuring Flupper dome flasher implementation, VR animated backglass with spring-mounted inserts, Skitso-style insert lighting, and significant WebP optimization (reduced from 208MB to 73MB). Development was a rapid effort spanning June-July 2022 with contributions from fluffhead35, iaakki, apophis79, sixtoe, leojreimroc, rawd, o0skitso0o, manners7344, tomate80, and others.

Build Notes

Desktop Alphanumeric Score Display

For System 11 tables with no DMD, desktop score displays need segmented digit objects. Copy digit code and objects from another System 11 table (e.g., Whirlwind, Taxi, Dr. Dude). VR and desktop digit implementations cannot run simultaneously -- code must toggle between them based on VRRoom state. The DMD display timer must be enabled for the display to appear.

Desktop Background and POV Setup

Align the POV so the table area matches the blacked-out region on the desktop background. Delete POV file to troubleshoot scaling/clipping issues. F5 (fullscreen) and F6 (windowed) may render differently when VR components interfere.

Asset Cleanup Before Release

Always do an asset pass before release. In Diner, unused flasher textures took up 8MB and a 20MB unused backglass image was found.

Image Manager Warning

VPX image manager may report an image as "unused" even if the script dynamically switches to it. Always search for the exact image name in the script before deleting.

Development History

Key milestones:

  • v01-v02: fluffhead35 initial cleanup, Flupper dome flashers, sound fixes
  • v02c: Roth drop targets, sling corrections
  • v03: leojreimroc VR room, animated backglass with working clock and spring inserts
  • v05-v06: Ramp slowdown fixes, VR burger and fries added
  • v08: Desktop alphanumerics, B2S support, BountyBob POV
  • v13: sixtoe left ramp ball-stuck fix (apex height adjustment)
  • v17: o0skitso0o GI lighting overhaul, LUT update, Skitso-style inserts
  • v18: Merge of v17 lighting into v16 (v17 had table corruption from debug VPX saves)
  • v19a: New Williams flipper bats, DL adjustment to 0.5

Scripting

Flupper Dome Flasher Implementation

Key implementation details:

  • Domes consist of 2-3 primitives (Whirlwind version has an additional prim with new texture)
  • The fade speed exponent (^0.2 to ^0.7) controls how quickly domes fade; too low causes sharp cutoff
  • objtargetlevel array (from Jokerz) provides more correct flasher behavior for tables that tend to keep flashers on
  • Timer intervals should be 16ms (not 30ms) so brightness updates every frame on 60Hz
  • Fade down value of 0.85 recommended when using 16ms intervals
  • Flasher bloom objects must be aligned directly over base objects in X-Y, positioned about 40 VPU above (not 60)

SolCallback vs SolModCallback

Check how flasher subs are called to determine modulation support. SolCallback gives true/false, SolModCallback gives intensity 0-255. Check the manual to verify if ROM has modulated solenoid outputs.

Dual Bulb Insert Lighting

Many tables (Diner, Simpsons) have 2 bulbs per insert: a small insert bulb (#44, 2W 6.3V) and a larger flasher bulb (#89, 12V 5W). The flasher is driven by a solenoid and is much brighter. In VPX, use 2 different lights per insert with slightly different center points.

Crossfade Image Transitions

When dome flashers have a nice fade but wall reflections use instant image swaps, the inconsistency is jarring. Solutions: hook them up as lights off the solenoid, or use a crossfade technique with materials and opacity (used in Judge Dredd, TFTC plastics).

B2S Backglass Integration Pattern

Dim stat
Sub B2SSTAT
    If EnableBlacksadBackglass Then
        If B2SOn Then
            Controller.B2SSetData 100+stat, 0
            stat = INT(rnd*6)+1
            Controller.B2SSetData 100+stat, 1
        End If
    End If
End Sub

Call B2SSTAT from event subs (plunger hits, bumpers). Wrap in a flag so users can toggle B2S support.

GI State-Based DL Adjustments

For binary GI state changes, add flipper prim DL commands in the GI state change sub. Values: 0.1 (GI off) and 0.4 (GI on). For smooth GI fading, use Lampz and its giupdates sub instead of binary swaps. Objects using DL look wrong when GI goes off if DL does not change accordingly.

Disable Lighting (DL) for Object Brightness

DL range is 0-1 in the editor, but via script debugger primname.blenddisablelighting = 200 can make objects very bright (used for Flupper inserts and domes). DL values should change with GI state. Fine-tune in debugger first, then set values in script.

3D & Art

VR Room Best Practices

VR cab/room components set to visible AND static will NOT become invisible through script when VRRoom=0. This causes clipping in desktop mode. Solution: set all VR components to non-visible and non-static in the editor, then make them visible with code.

VR Ball Reflections Setup

In VPX Properties: "Reflection strength" = reflection of objects in the playfield including ball. For VR, must be set to "On" not "Default" (VPVR does not use the default value). "Reflection of playfield" = reflection of the playfield IN the ball.

Animated VR Backglass

leojreimroc's VR backglass features animated character inserts on springs that react to gameplay: plunger release (slight movement), pop bumpers/slings (more movement), nudging (most movement), drop targets/grill bonus (additional movement). Also includes a working clock and 3D depth with diners behind windows.

WebP Image Optimization

WebP optimization reduced Diner from 208MB to 73MB at 85% quality. Key points:

  • 85% lossy WebP shows no visible difference from PNG at 100% zoom
  • Lossless WebP is 3x larger than 85% lossy but avoids generation loss
  • Lossy-to-lossy re-encoding degrades quality over time
  • WebP does not use RGB color space except in lossless mode
  • Tables may not load faster since WebP takes longer to decompress
  • Recommendation: keep source assets lossless, only compress at final export

Static Rendering vs Dynamic for Plastics

Plastics set to static rendering and opaque material will not change appearance when lighting changes (e.g., GI going off). Fix: disable static rendering on objects that should respond to dynamic lighting. Set "disable lighting from below" to 1 for plastics that should not transmit light from underneath.

Skitso Style Inserts

Skitso-style inserts work well for "non-visible-lens" inserts but struggle with arrow inserts where the base texture is too poor to look bright enough. For arrow/lensed inserts, use proper 3D inserts.

Light Falloff Power

Falloff power affects ball reflections as a side effect. For GI lights, 2-2.5 is typical. Only set "show reflection on balls" for one object per visible light source, not every bulb.

Ball Reflection Limit

VPX can only show 8 light reflections per ball simultaneously. A common mistake is enabling reflection for every bulb. Only enable it on one object per visible light source.

Playfield Shadow Layer Separation

For 3D inserts, separate shadows from the playfield base image. Create shadow image via "difference" between clean and baked PF images. Overlay in VPX using a Flasher object. Never bake shadows directly into playfield images.

3D Insert Cutout Techniques

Cut around text/imagery on the insert. For smooth edges: separate edge/text into its own image with alpha transparency, cast using a Ramp object. If PF has baked shadows through inserts, fix by sampling surrounding color and filling.

FBX Model Import Issues

FBX models from Sketchfab may import as a single model with texture maps for individual pieces. Models need cleanup in Blender before VPX use.

Troubleshooting

Roth Drop Targets Require Timer

When implementing Roth drop targets, the DropTarget Animate call must be in a timer. Without it, the primary collidable gets set to 0 instead of 1 at startup.

Ball Stuck on Ramp -- Apex Height Fix

Ball getting stuck on ramp curve caused by the ramp apex not matching the physical high point. Fix: set the apex of the hill at the apex of the corner. When elevation and table slope cancel out, you get a flat section where the ball loses momentum. Real ramp protectors bridge the playfield-to-ramp transition gradually.

GI Light Intensity Values Too High

Sling area GI bulbs set to intensity 500 caused blooming ball reflections. Reduced to 25. Light emission scale and range values should be around 4,000,000 each.

VPX 10.7 Stability Issues

32-bit version crashed on repeated table runs; 64-bit was stable. Memory leak after 4-5 table starts. Debug version of 10.7.1 (rev 217 64-bit) was most stable for editing. Saving from the debug VPX version corrupted all physics values in the material manager.

Table Corruption from Debug VPX Saves

Saving from the VPX debug version corrupted all physics values (everything set to 0), causing bizarre flipper behavior. Fix: manually merge changes from corrupted version into last known-good version.