Spielerando

Taking a photo of a ghost: it counts when it is in the shot, but how do you know?

A puzzle where the player must photograph something needs the game to judge the picture fairly. Checking only the middle of the thing lets half-cut and hidden shots through, and rejects good ones. Here is a check that looks at the whole shape and returns a reason when it fails.

Why this works

A fair verdict looks at the whole thing, not just its middle. If the entire shape must fit in the picture, at a sensible size and in plain view, then players know what a good shot is, and a refusal can name the exact reason.

When not to use it

Do not demand this when a loose photo is part of the fun, such as a quick snap in a party game, or when the subject moves too fast to frame. Accept a part of the subject, or reward partial shots with a lower score instead of rejecting them.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 27 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 "Taking a photo of a ghost: it counts when it is in the shot, but how do you know?" (read_entry camera-photo-of-the-ghost-counts-only-when-framed) 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