asteroid in asteroid field can only appear when not appearing on screen #126
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.