Contraption Builder: terrain, vehicles, Multiply, scrolling+slick palette, Bridge/Chain audit#23
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
uGrouptag, 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.
group; the new group is init), wrapped in atryso a failure degrades to an un-grouped palette instead of aborting the UI build.raiseUI/clearUIare 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:
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:
Kept as a draft for that reason.
🤖 Generated with Claude Code