Spielerando

Show an arrow at the screen edge that points to a far-away camp or waypoint

When the base is far off screen the player needs a hint where to go. The marker must sit exactly on the edge, point the right way, and disappear when the target is in view. Here is the small bit of geometry that does it, with a trap at the middle of the screen.

Why this works

The arrow must point at the target, so it has to sit on the straight line from the screen centre to it. Shrinking that one line until it touches the edge keeps both direction and place correct. Moving each coordinate on its own bends the line and the arrow lies.

When not to use it

Not good when the target is nearly always visible, or when a crowd of markers would clutter the edge. Then show the distance in a small list or on a map, or mark only the closest few targets.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • A diagram of every state
  • 16 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Show an arrow at the screen edge that points to a far-away camp or waypoint" (read_entry survival-offscreen-marker-on-screen-edge) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP