Skip to content

Sweep camera into and out of 3D battles - #8

Open
kennethreitz wants to merge 1 commit into
DramaticShape:masterfrom
kennethreitz:codex/sweeping-battle-transition
Open

Sweep camera into and out of 3D battles#8
kennethreitz wants to merge 1 commit into
DramaticShape:masterfrom
kennethreitz:codex/sweeping-battle-transition

Conversation

@kennethreitz

Copy link
Copy Markdown

TL;DR

  • Sweeps the live overworld camera into the 3D battle rig and back out instead of cutting abruptly.
  • Uses a 0.7-second smootherstep transition with a restrained vertical and lateral arc.
  • Freezes battle logic during the sweep and falls back safely to the existing battle renderer if the 3D pass fails.

What changed

The 3D battle path now captures the exact active overworld camera, interpolates its eye, focus, field of view, and world curvature into the battle camera, and reverses that move before returning control to the player.

Entry and exit are explicit battle phases. Battle logic, furniture, and UI remain out of the way during the camera move, while the existing Pokémon composition remains intact for the exit. Destructive battle teardown is delayed until the return sweep completes.

The transition is presentation-only: it does not move the player, Pokémon, or arena. Any rendering failure resumes the plain battle path or tears down immediately rather than leaving the game stuck.

This bumps the mod version to 1.1.3.

Why

The 3D battle environment already makes battles feel continuous with the voxel overworld, but an immediate camera cut made entering and leaving them feel disconnected. A short sweep preserves that spatial relationship without slowing normal play.

Validation

  • lua tests/battle_sweep_test.lua
  • Full Dramatic Shape suite: 287/287 checks passed
  • Installed and exercised on an AYN Thor running Gen1Recomp; entry and exit transitions were confirmed working in live play

@kennethreitz
kennethreitz marked this pull request as ready for review July 29, 2026 11:31
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