Skip to content

Add Future Pinball table import support#564

Draft
freezy wants to merge 16 commits into
masterfrom
feature/fpt-import
Draft

Add Future Pinball table import support#564
freezy wants to merge 16 commits into
masterfrom
feature/fpt-import

Conversation

@freezy

@freezy freezy commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • add bounded readers for Future Pinball FPT, FPL, and FPM compound files
  • extract a deterministic, lossless source bundle containing every stream plus images, sounds, music, DMD data, scripts, models, lists, linked-library resources, and opaque records
  • decode MilkShape models and generate supported procedural table meshes
  • convert Future Pinball materials and textures into reusable Unity assets
  • create VPE-native playfield and primitive colliders; no Unity/PhysX colliders are used
  • add a dedicated Unity import wizard, provenance components, import reports, and a recreation backlog for unsupported behavior
  • update OpenMcdf to 3.1.4 and migrate the existing compound-storage callers

Collision mapping

  • playfield dimensions, glass, bounds, and slope use PlayfieldColliderComponent
  • procedural and per-polygon model collision use PrimitiveColliderComponent
  • boxes map exactly to triangle meshes
  • cylinders, spheres, and tapered capsule/flipper shapes are tessellated approximations
  • invalid, unknown, disabled, or otherwise unsupported collision records remain in the lossless bundle and are reported in the recreation backlog

Validation

  • 44 Future Pinball tests pass against five locked real-table fixtures
  • VisualPinball.Engine.sln builds successfully
  • the FPT Unity runtime/editor sources compile against the actual Unity managed and project assemblies
  • each implementation phase, including the final VPE-native collider conversion, was independently reviewed and greenlit by Claude Opus before commit

Current limitations

  • Future Pinball scripts are preserved but not executed
  • numeric Future Pinball collider-event dispatch is not recreated
  • moving mechanisms and other runtime behavior still require semantic mapping to their native VPE components
  • curved analytic collision shapes are tessellated rather than represented analytically
  • physics-material coefficients are not yet translated for numerical parity with Future Pinball
  • a live Unity import/play-mode smoke test is pending because the current local HDRP project has unrelated pre-existing Magnet/BitField64 and missing MagnetDetectionWindow compile errors

Fixture setup

Set VPE_FPT_FIXTURES to the directory containing the locked Future Pinball table corpus before running the real-table tests.

@greptile-apps

greptile-apps Bot commented Jul 12, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds Future Pinball table import support. The main changes are:

  • Bounded readers and extractors for FPT, FPL, and FPM compound files.
  • Source bundle preservation for streams, assets, scripts, models, and opaque records.
  • MilkShape model decoding and procedural table mesh generation.
  • Unity import UI, reports, provenance components, and VPE-native collider creation.
  • OpenMcdf update and compound-storage caller migration.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The latest surface-placement fix skips unresolved support cases instead of placing objects at a guessed height.
  • Texture lookup keeps exact names ahead of aliases and avoids using ambiguous aliases.

Important Files Changed

Filename Overview
VisualPinball.Unity/VisualPinball.Unity.Editor/Import/FptSceneConverter.cs Adds Future Pinball scene conversion, asset binding, support-height resolution, native element creation, and collider generation.
VisualPinball.Engine/IO/FuturePinball/FuturePinballTableReader.cs Adds table loading for Future Pinball compound storage data.
VisualPinball.Engine/IO/FuturePinball/FuturePinballExtractor.cs Adds extraction of Future Pinball resources into a preserved source bundle.
VisualPinball.Engine/IO/FuturePinball/FuturePinballGeometry.cs Adds Future Pinball coordinate conversion, shape point handling, and procedural geometry helpers.
VisualPinball.Engine/IO/FuturePinball/FuturePinballCollider.cs Adds conversion of Future Pinball collision records into VPE primitive collider meshes.

Reviews (6): Last reviewed commit: "editor(fpt): skip unresolved procedural ..." | Re-trigger Greptile

Comment thread VisualPinball.Unity/VisualPinball.Unity.Editor/Import/FptSceneConverter.cs Outdated
Comment thread VisualPinball.Unity/VisualPinball.Unity.Editor/Import/FptSceneConverter.cs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant