when aiming with the laser it should show the full range #203

Closed
opened 2026-09-04 20:34:17 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Implemented in commit a902fdd on main.

Cause
The aim camera's zoom floor is 0.4, a value sized for the gas bomb's 950-unit range. The laser reaches 2900, so the fit was clamped long before the beam's end came into view: on a 720x1280 screen the far end sat about four times further out than the visible half-screen. The guide line was drawn to full range the whole time - it simply left the screen, so there was no way to see how far the shot carried. Measured rather than guessed: with the drag applied, the aim resolved a target 2900 units away while the camera stopped at the 0.4 floor.

Change

  • The laser gets its own zoom floor (0.1), so the fit is no longer cut short. It still only zooms as far as the aimed direction needs.
  • The aim now frames the FAR END of the beam rather than the point the aim currently sits on. That matters after #201: the assist can settle that point on an enemy a few hundred units away, and framing it would say the shot stops there.
  • The guide draws the beam's whole length, with a cross-tick where it stops, and a ring on the assisted target when that is nearer - the line still runs past it, because everything behind it on the same line is hit too.
  • Both marks are sized in SCREEN pixels rather than world units. At the zoom needed to show 2900 units, a mark measured in world units is a few pixels of nothing exactly when it matters most.

The fleet does read small while aiming. That is inherent to showing a beam roughly fourteen times the width of the formation; it lasts only as long as the aim, and the camera restores afterwards.

Also fixed on the way
tests/_laser_aim_preview.gd, the screenshot fixture for this state, had been rendering an empty screen: it stocked no energy (so the shot was refused before aiming began) and spawned a four-hull fleet into the three-slot cap, which dropped the one ready laser it needed. Both corrected, and it now shows the state it was written for.

Verification

  • test_laser_vessel.gd now asserts the full range - 2900 plus the beam's half-width - is framed inside the viewport when aiming begins.
  • Focused groups: laser 4/4, camera 1/1, redraw 1/1.
  • Visual check at 720x1280: the guide runs from the fleet to a cross-tick that is on screen, with the enemies along it visible.
  • Full suite: 161/161 passed.

No web deployment was performed.

Implemented in commit `a902fdd` on `main`. **Cause** The aim camera's zoom floor is 0.4, a value sized for the gas bomb's 950-unit range. The laser reaches 2900, so the fit was clamped long before the beam's end came into view: on a 720x1280 screen the far end sat about four times further out than the visible half-screen. The guide line was drawn to full range the whole time - it simply left the screen, so there was no way to see how far the shot carried. Measured rather than guessed: with the drag applied, the aim resolved a target 2900 units away while the camera stopped at the 0.4 floor. **Change** - The laser gets its own zoom floor (0.1), so the fit is no longer cut short. It still only zooms as far as the aimed direction needs. - The aim now frames the FAR END of the beam rather than the point the aim currently sits on. That matters after #201: the assist can settle that point on an enemy a few hundred units away, and framing it would say the shot stops there. - The guide draws the beam's whole length, with a cross-tick where it stops, and a ring on the assisted target when that is nearer - the line still runs past it, because everything behind it on the same line is hit too. - Both marks are sized in SCREEN pixels rather than world units. At the zoom needed to show 2900 units, a mark measured in world units is a few pixels of nothing exactly when it matters most. The fleet does read small while aiming. That is inherent to showing a beam roughly fourteen times the width of the formation; it lasts only as long as the aim, and the camera restores afterwards. **Also fixed on the way** `tests/_laser_aim_preview.gd`, the screenshot fixture for this state, had been rendering an empty screen: it stocked no energy (so the shot was refused before aiming began) and spawned a four-hull fleet into the three-slot cap, which dropped the one ready laser it needed. Both corrected, and it now shows the state it was written for. **Verification** - `test_laser_vessel.gd` now asserts the full range - 2900 plus the beam's half-width - is framed inside the viewport when aiming begins. - Focused groups: `laser` 4/4, `camera` 1/1, `redraw` 1/1. - Visual check at 720x1280: the guide runs from the fleet to a cross-tick that is on screen, with the enemies along it visible. - Full suite: **161/161 passed**. No web deployment was performed.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#203
No description provided.