Skip to content

Contraption Builder: terrain, vehicles, Multiply, scrolling+slick palette, Bridge/Chain audit#23

Merged
SethMorrowSoftware merged 1 commit into
mainfrom
claude/wonderful-lamport-6Kh2T
Jun 5, 2026
Merged

Contraption Builder: terrain, vehicles, Multiply, scrolling+slick palette, Bridge/Chain audit#23
SethMorrowSoftware merged 1 commit into
mainfrom
claude/wonderful-lamport-6Kh2T

Conversation

@SethMorrowSoftware
Copy link
Copy Markdown
Owner

@SethMorrowSoftware SethMorrowSoftware commented Jun 5, 2026

Summary

Enhances the Contraption Builder with terrain, drop-in vehicles, a scrolling + polished tool palette, a Multiply tool, and an audit/fix of the Bridge & Chain span tools.

🏔️ Terrain objects

A TERRAIN palette section drops static scenery the dynamic parts rest on, roll down and bump into:

Tool What it is
Platform A solid ledge — floors, steps, raised shelves
Ramp A wedge for rolling/sliding, with a Facing setting (high-left or high-right) so slopes work in both horizontal directions
Hill A rounded mound parts roll over and settle against

Each is a static polygon body (the Kit's sync skips it) and sizes, rotates, recolours, takes an adjustable grip, drags, duplicates and saves/loads like any part; joints can pin to them. Rotation/facing are baked into the polygon's points (body angle stays 0) since a static body never re-syncs. A "Terrain Run" recipe shows all three.

🚗 Drop-in vehicles

A VEHICLES section adds a Car you place like any other object: a chassis on two sprung, motorised, grippy wheels that drives off when you press Run. Its three parts share a uGroup tag, so dragging any one moves the whole car as a unit, and the grouping round-trips through save/load/reset. The "Motor Cart" recipe builds this same improved car.

⧉ Multiply tool

Alongside Duplicate, a new Multiply tool asks how many copies you want (1–50) and drops them in a tidy grid — each an independent copy (same size, colour, material, settings). Duplicate and Multiply now share one copyPart() helper that clears the group tag, so a copy of a vehicle part is a free part rather than something tied to the original car (this also fixes a latent bug where a duplicated vehicle part inherited the car's group).

📜 Scrolling + polished palette (stack stays 760 px)

The left palette is now a single vertically scrolling group, so the full tool list (SHAPES · TERRAIN · SPECIAL · VEHICLES · JOINTS) fits the original 760 px window.

  • Polish: brighter section headers over hairline divider rules, left-aligned menu-style tool buttons, and a hover highlight on idle buttons (selected buttons keep their accent).
  • Grouping uses the confirmed LiveCode idiom (select controls, then group; the new group is in it), wrapped in a try so a failure degrades to an un-grouped palette instead of aborting the UI build.
  • raiseUI/clearUI are owner-aware so they treat the palette group as one top-level unit.

🌉 Bridge & Chain audit + fixes

The span builder is fundamentally sound (geometry, pin-chaining, world-anchoring, marker-hiding and save/load all round-trip). Fixes:

  • Spans ignore Bouncy mode — segments are now always non-bouncy, so bridges/chains settle.
  • Duplicating a rotated part keeps its size — copies the stored design size, not the inflated bounding box.

⚠️ Testing note

No LiveCode/OpenXTalk engine runs in the build environment, so this was validated by structural analysis (all 358 handlers + blocks balanced), symbol cross-referencing, and hand-tracing the create → edit → drag → multiply → save → load → reset round-trips. Worth a quick IDE smoke-test before merge:

  1. the scrolling palette group + header rules + left-aligned/hover button styling render as intended;
  2. car drag-as-a-unit + that it drives the intended direction (flip a wheel motor in the joint inspector if not);
  3. the Multiply dialog/grid placement.

Kept as a draft for that reason.

🤖 Generated with Claude Code

Terrain: a new TERRAIN palette section drops static scenery — Platform
(ledge), Ramp (wedge) and Hill (dome) — as static polygon bodies the
dynamic parts rest on, roll down and bump into. Each one sizes, rotates
(the angle is baked into the outline so a sync-skipped static body still
tilts), recolours, takes an adjustable grip, drags, duplicates and
saves/loads like any other part; joints can pin to them. Adds a
"Terrain Run" example recipe that rolls a ball down a ramp, along a
ledge and into a hill.

Chain/Bridge audit + fixes:
- Spans were built with the Bouncy build option applied to every
  plank/link, so bridges and chains jittered and never settled. Span
  segments are now always non-bouncy regardless of the toggle.
- Duplicating a rotated part (including span planks and terrain) copied
  the inflated bounding box as the new size; it now copies the stored
  design size.

The window grows to fit the new palette section; the arena, inspector,
status bar and modals already derive from the card size, so they adapt.

https://claude.ai/code/session_01SFwisa2Uug3HKEtLqMTYb7
Copy link
Copy Markdown
Owner Author

@SethMorrowSoftware SethMorrowSoftware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!

@SethMorrowSoftware SethMorrowSoftware marked this pull request as ready for review June 5, 2026 02:40
@SethMorrowSoftware SethMorrowSoftware merged commit 794570e into main Jun 5, 2026
4 checks passed
@SethMorrowSoftware SethMorrowSoftware changed the title Contraption Builder: terrain objects (Platform/Ramp/Hill) + Bridge/Chain audit Contraption Builder: terrain + drop-in vehicles + scrolling palette + Bridge/Chain audit Jun 5, 2026
@SethMorrowSoftware SethMorrowSoftware changed the title Contraption Builder: terrain + drop-in vehicles + scrolling palette + Bridge/Chain audit Contraption Builder: terrain, vehicles, Multiply, scrolling+slick palette, Bridge/Chain audit Jun 5, 2026
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.

2 participants