Chapter 2: Knots, Diverts, and Looping Patterns

This chapter introduces the concept of knots, sections of an ink story, and diverts, which is the functionality to move between them. We will then move into defining and moving between knots to create simple looping patterns. By incorporating choices (covered in Chapter 1, Text, Flow, Choices, and Weaves), we will see how you can begin to experience narratives composed of selecting options, having the story move between knots, and then use looping patterns to build complex interactions from simple rules in ink.

In this chapter, we will to cover the following main topics:

  • Tangling a flow in knots
  • Moving between sections
  • Looping knots
  • Detecting and changing options

Technical requirements

The examples ...

Get Dynamic Story Scripting with the ink Scripting Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.