Skip to content

Cactus Canyon

Cactus Canyon underwent a collaborative VPW upgrade from Skitso's older mod, featuring implementation of Roth drop target physics, complete GI lighting overhaul, and VR room integration - all accomplished in one intensive week of development.

Build Notes

Roth Drop Target Physics

Implemented Roth drop target physics to replace previous implementation. Key configuration:

Initialization: - Start primitives in UP position, then drop them in init (prevents test mode weirdness) - DTDropDelay controls timing of secondary wall collision - DTDropupUnits set to 20 (targets were over-extending on raise) - Grazing hit distance threshold: 37.5 units

How It Works: - Ball must have perpendicular velocity > 0 before hit (hitting from front) - Ball must have perpendicular velocity < 0 after hit (native VPX requires sign change) - DTBallPhysics code recalculates ball trajectory after front-face hit detection - Secondary wall becomes collidable briefly based on DTDropDelay - If target drops fast enough, secondary wall becomes uncollidable before ball reaches it

Tuning Parameters: - DTDropDelay: How long secondary wall stays collidable - Secondary wall position: Distance from primary target face - Grazing hit threshold (cdist): Distance from target center for grazing detection (set to 37.5 for CC)

GI Lighting Overhaul

Version 016 featured complete GI remake by Skitso: - Remade all GI lights from scratch - Altered DL/DLFB values throughout - Modified textures for accurate lighting - Added disable lighting to Bart's face and hat when GI is on - Spotlight points to head with DL value of 0.2-0.25

Before-after comparison showed dramatic visual improvement.

Desktop and Cabinet POV

Fixed Desktop POV in version 015 - previous POV was inadequate for desktop play. Cabinet POV needed separate configuration for landscape vs portrait modes. Key principle: Don't show too much of bottom of flippers.

Troubleshooting

Drop Target Glancing Blows

Original issue: Only perpendicular hits would drop targets, glancing blows didn't register. This was particularly noticeable on Cactus Canyon since drop targets are out in the open rather than against rubbers.

Final Solution: Disable secondary wall for grazing hits to front face (cdist > 37.5). This allows the ball to continue past the target on glancing blows while still registering the hit.

Code Understanding:

If perpvel <= 0 or perpvelafter >= 0 Then
    DTCheckBrick = 0  ' No hit (back face or side face)
ElseIf DTEnableBrick = 1 and perpvel > DTBrickVel and DTBrickVel <> 0 and cdist < 8 Then
    DTCheckBrick = 3  ' Brick behavior
Else
    DTCheckBrick = 1  ' Normal hit
End If

  • perpvel <= 0: Ball hitting back face
  • perpvelafter >= 0: Ball hitting side face
  • Both > 0 AND < 0: Front face hit

Bart Hat Animation

Bart's hat was getting completely dislodged from head and extending way too far (visible in VR). Fixed by reducing hat raise height to 30% of original value and preventing complete dislodgement.

Ball Stuck Behind Bart's Head

Ball can get stuck behind Bart's head, requiring nudging to free (same as real machine). However, sometimes ball cannot be nudged free.

Thalamus debug trick for lost balls:

dim b:b=getballs:debug.print b(0).x & " " & b(0).y & " " & b(0).z

For multiple balls, change b(0) to b(1), etc. Create a gate primitive (width 50) and position at exact ball coordinates for visual location.

Solution: Fill "wide" gaps between objects to prevent ball traps.

Overlapping GI Lights Brightness Clipping

Top right secondary GI lights were floating above other lights, offset, creating super bright areas with clipping. When lamps are exactly on top of each other in desktop POV, bulbs won't illuminate correctly. The compromise solution for desktop can break in VR, requiring careful balance.

TopGI2 Lights Not Working

TopGI2 lights appeared very flat/dim in desktop mode but looked correct in VR. Code should activate lights when VRRoom = 0, but worked for some users and not others despite identical const settings. Mystery remained unsolved - potential hardware/driver difference.

Light intensity parameter was set to 5 instead of 50 in early versions - correcting this value helped.

Flasher First-Time Loading Hiccups

First-time flasher activation causes brief hiccup due to loading textures on-demand.

Solution: Preload flasher images like Addams Family does - pulse all flashers once in table_init to load textures into RAM before gameplay.

VR

VR Room Implementation

Automatic VR room switches based on mode with performance optimizations: - Combined some timers for better performance - Automatic mode detection and switching - VR-specific fixes for primitives and visibility - Minimal room option available

VR Performance

Some stuttering reported in VR mode. Performance check conducted before release. Timer consolidation helped - moving animations from fixed 10ms timers to performance-conscious implementation.

Game Knowledge

Real Machine Variance

Each real Cactus Canyon machine plays differently due to: - Table angle varies machine to machine - Waxing makes ball faster - Worn parts play differently - Maintenance and condition affect behavior

Important principle: Recreation is of "our table we have here" - other examples of the same game will play differently due to wear, setup, and maintenance.

Best Practices

Testing with Reference Videos

PAPA gameplay video (https://youtu.be/j-x03RBvTs4) shows drop target behavior: - 5:18: Glancing blow on right side, drops, ball continues - 8:11: Similar scenario - doesn't drop (possibly failing mechanism) - 10:44: Excellent example of successful glancing blow

Centaur gameplay video also used as baseline for developing drop target physics.

Release Screenshot Workflow

  1. Take 4K screenshot of playfield
  2. Take VR cabinet screenshot
  3. Add VPW and other logos in Photoshop
  4. Prepare release text with credits and change notes

For marketing screenshots, may want brighter environmental image than used for gameplay even if gameplay looks correct to creators.

Iterative Development

Version progression from 011-019 in one week shows rapid iteration: - Physics testing and tuning (drop targets) - Visual improvements (GI, lighting) - VR room implementation - Bug fixing (balls stuck, animations) - POV adjustments for different modes - Performance optimization - Community testing and feedback

Fast iteration with multiple contributors working in parallel, then consolidating improvements.

Tools & Resources

Flupper Ramp Tutorial

Flupper created a tutorial using Cactus Canyon as example with Blender Octane:

  1. Vertex painting to mark areas needing refraction
  2. Import VPX table in Blender with lattice to deform to VPX camera view
  3. Texture VPX table elements with VPX screenshot projected from view
  4. Bake from camera point of view in Octane
  5. Only vertex-painted white areas are opaque, rest almost transparent
  6. Use church HDR environment
  7. OSL script makes VPX table transparent to environment

This allows table to reflect on ramps AND environmental reflections behind table to reflect on bottom of ramps.