Skip to content

TruckToy: alien-world space rover reskin#80

Merged
greenfire27 merged 2 commits into
developmentfrom
truck-toy-update
Jun 29, 2026
Merged

TruckToy: alien-world space rover reskin#80
greenfire27 merged 2 commits into
developmentfrom
truck-toy-update

Conversation

@greenfire27

Copy link
Copy Markdown
Collaborator

Reskins the TruckToy from an industrial monster-truck demo into a space rover crossing an alien world, plus a Sandbox-wide camera-aspect fix surfaced during the work.

TruckToy reskin

  • Art: new truck body + tires, planet floor, alien bricks/bridge, and reskinned obstacles (wrecked cars, planks, walls, piles). Retired the old industrial / night-background / debris art.
  • Parallax background (scripts/background.cs): camera-driven, data-driven layers updated per render frame against the post-view-limit camera position — far screen-fit sky layers plus a seamless world-anchored ground band, with per-object parallax for placed decorations.
  • Perf: object-pooled fireballs and impact explosions to remove the mid-play allocation hitch.
  • Effects: fire/explosion/fireball recolored to Torque green via TruckToy-local asset copies.

Sandbox camera-aspect fix

Toys set a fixed-aspect camera size in their reset(). The window-resize handler (onExtentChange) only fires on an actual extent change, so reloading or restarting a toy left that baked-in ratio in place and stretched the scene when the window had since been resized.

  • Factored the aspect math into SceneWindow::updateCameraAspect().
  • Re-applied it after the toy's camera is set: at the end of loadToy() (initial load, toy-switching, and the Reload button) and after the Restart button's direct reset() call.
  • onExtentChange now delegates to the same helper, so live-resize behavior is unchanged.
  • Fixes the stretch for all toys, not just TruckToy.

Testing

  • Verify in-engine: resize the window to a non-4:3 shape, then exercise Reload and Restart on TruckToy (and another toy) — the scene should stay un-stretched, and live-resize should still track the window.

🤖 Generated with Claude Code

greenfire27 and others added 2 commits June 29, 2026 18:08
Transform the TruckToy from an industrial monster truck into a space
rover crossing an alien world.

Art:
- New truck body + tires, planet floor, alien bricks/bridge, and
  reskinned obstacles (wrecked cars, planks, walls, piles).
- Retired the old industrial / night-background / debris art.

Parallax background system (scripts/background.cs):
- Camera-driven, data-driven layers updated per render frame
  (RenderCallback) against the post-view-limit camera position.
- Far screen-fit sky layers (background_0/1) + a seamless tiling,
  world-anchored ground band (background_2).
- Per-object parallax for placed decorations (foreground walls).

Gameplay/perf:
- Object-pooled fireballs and impact explosions to remove the
  mid-play allocation hitch.
- Defaults: Wheel Speed 500, Rotate Camera off.

Effects:
- Recolored fire particle effects (bonfire/explosion) and the fireball
  to the Torque green via TruckToy-local asset copies; smoke/debris and
  the exhaust left natural.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Toys set a fixed-aspect camera size in their reset(); the window-resize
handler (onExtentChange) only fires on an actual extent change, so
reloading or restarting a toy left that baked-in ratio in place and
stretched the scene when the window had since been resized.

Factor the aspect math into SceneWindow::updateCameraAspect() and re-apply
it after the toy's camera is set -- at the end of loadToy() (covers initial
load, toy-switching, and the Reload button) and after the Restart button's
direct reset() call. onExtentChange now delegates to the same helper, so
live-resize behavior is unchanged. Fixes all toys, not just TruckToy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@greenfire27 greenfire27 merged commit 89788ad into development Jun 29, 2026
18 checks passed
@greenfire27 greenfire27 deleted the truck-toy-update branch June 29, 2026 22:32
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