Mussi
mussikara.bsky.social
Mussi
@mussikara.bsky.social
Freelance programmer and indie #GameDev
That barely fit in the char limit. _current_intersection_point is relative to center of the screen, might have to offset.
Other than that; where there is one, there are many. First do all positions, then all intersections, then all indicators etc. for cache coherency.
July 8, 2025 at 11:44 AM
You can change your find intersection to become branchless:
# precompute these
wr = 0.5 / _viewport_size.x
hr = 0.5 / _viewport_size.y

# assuming direction is from the center of screen
v = normalize(_current_target_direction)
_current_intersection_point = minf(absf(wr * v.x), absf(hr * v.y)) * v
July 8, 2025 at 11:39 AM
Ok bsky video compression is not great x)
October 18, 2024 at 11:35 AM