Skip to reading
Text & Sierra-Style Adventures

11. Use Command Preview as a matching test

Edition 0.86.3.4

Build a complete text or graphical parser adventure with typed commands, inventory puzzles and press-to-walk controls.

Download PDFView illustrations

Type PLEASE EXAMINE THE BRASS KEY in Command Preview and choose Parse Preview. The result should identify the Look verb and the key object. This is a quick way to spot a missing synonym or an unexpected target.

Figure 5. Command Preview shows what the parser recognized. It does not run the puzzle.

1. Try LOOK KEY, EXAMINE KEY and INSPECT KEY.

2. Try the same commands with mixed case and punctuation.

3. Try an unknown noun. Check that it does not accidentally match another record.

4. Try a two-object command and inspect the source and target references.

5. Run the command in Play as well. Preview cannot prove that inventory checks, actions or room transitions work.

The native matcher prefers the longest matching alias. Equal-length matches do not produce an automatic “Which key?” question. Avoid ambiguous names, or add explicit disambiguation in your project’s command handler.

Page 14 of 68Permalink
Go to page