TruckToy: alien-world space rover reskin#80
Merged
Conversation
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>
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.
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
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.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.SceneWindow::updateCameraAspect().loadToy()(initial load, toy-switching, and the Reload button) and after the Restart button's directreset()call.onExtentChangenow delegates to the same helper, so live-resize behavior is unchanged.Testing
🤖 Generated with Claude Code