asteroid in asteroid field can only appear when not appearing on screen #126

Closed
opened 2026-08-24 11:56:19 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Done in the commit below.

The guard was a 420px bubble around the fleet - smaller than the window, so a
rock could materialise in plain sight several hundred pixels away but well
inside the view. "Not on the fleet" was never the rule you notice; "not in
view" is.

The keep-out area is the visible world rect now, grown by a margin so a rock
placed just outside does not drift into view on the frame it was created. The
old bubble survives as a FLOOR under it: what to use when the viewport cannot
be measured (no camera on a scene's first frame, or a headless run), and for a
heavily zoomed-in view where the screen is narrower than the distance a rock
needs to be safe.

Candidates inside are pushed out through the nearest edge rather than dropped,
so the field keeps its density around you instead of thinning out exactly where
you are looking.

Measured: keep-out 2200x2200 over a 1920 screen, nearest asteroid 1899 units
out where it used to be allowed at 420.

Done in the commit below. The guard was a 420px bubble around the fleet - smaller than the window, so a rock could materialise in plain sight several hundred pixels away but well inside the view. "Not on the fleet" was never the rule you notice; "not in view" is. The keep-out area is the visible world rect now, grown by a margin so a rock placed just outside does not drift into view on the frame it was created. The old bubble survives as a FLOOR under it: what to use when the viewport cannot be measured (no camera on a scene's first frame, or a headless run), and for a heavily zoomed-in view where the screen is narrower than the distance a rock needs to be safe. Candidates inside are pushed out through the nearest edge rather than dropped, so the field keeps its density around you instead of thinning out exactly where you are looking. Measured: keep-out 2200x2200 over a 1920 screen, nearest asteroid 1899 units out where it used to be allowed at 420.
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#126
No description provided.