Spielerando

Split long dialogue into text boxes at sentence ends

A speech that does not fit the text box has to be cut somewhere, and cutting in the middle of a title or word looks broken. This entry shows how to break at sentence ends, keep short titles together, and still handle one huge sentence.

Why this works

People read in thoughts, and a sentence end is where a thought ends. Breaking there lets the eye rest at a natural pause, while cutting by raw length stops mid-idea and makes the player reread what was just on screen.

When not to use it

Poor for poetry, lists, or text with its own rhythm of short fragments, where the author chose every break. It also fails with languages that mark sentences differently. Break those by hand, or by a marker the writer places.

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
  • 55 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 "Split long dialogue into text boxes at sentence ends" (read_entry split-long-dialogue-into-text-boxes) 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