Will having more passages negatively affect a game in any way? If so, how?

If you are requesting technical assistance with Twine, please specify:
Twine Version: 2.3.9
Story Format: Sugarcube 2.31.1

Hey all! The game I’m making has a lot of text and some pictures. I’m considering making a version that is a better experience for mobile users, but it means splitting up a lot of longer passages into anywhere from 2-7 passages. So it would greatly increase the number of total passages. Will having more passages negatively affect a game in any way? If so, how?

If you are using the Twine 2.x application to build your Twine project then the main cause of slowdown
within the Story Map screen is the number of connecting arrows between the squares that are used to represent the Passages of your project.
eg. The more connections arrows there are the more effort that is required to draw the map.

This slowdown can be overcome by replacing some/most/all of your Markup based links with Macro based equivalents. How exactly you do this depends on the story format you’re using…
eg. SugarCube’s <<link>> macro.

/* Markup based links... */
[[Link Text is the Target Passage Name]]
[[Link Text|Target Passage Name]]
[[Link Text|Target Passage Name][$variable to "value"]]

/* Macro base equivalents that don't create connection arrows... */ 
<<link "Link Text is the Target Passage Name" "Link Text is the Target Passage Name">><</link>>
<<link "Link Text" "Target Passage Name">><</link>>
<<link "Link Text" "Target Passage Name">><<set $variable to "value">><</link>>

eg. Harlowe’s (link-goto:) and (link-reveal-goto:) macros.

[[Link Text is the Target Passage Name]]
[[Link Text->Target Passage Name]]
/* NOTE: Harlowe doesn't have a Markup equivalent of SugarCube's Link with Setter. */

(link-goto: "Link Text is the Target Passage Name", "Link Text is the Target Passage Name")
(link-goto: "Link Text", "Target Passage Name")
(link-reveal-goto: "Link Text", "Target Passage Name")[(set: $variable to "value")]

When it comes to running the generated Story HTML file itself, there are no real limitations to how many Passages you can have, nor does the number of them really effect the game. What will possible effect the running of it is the size of the play-through History, and that effect again depends on the story format you are using.

SugarCube includes configuration settings that allow the Author to control the maximum number of Moments stored in its History system, which allows it to discard older Moments when that limit is reached.

Harlowe doesn’t allow the Author to configure its History system, and that system stores each & every Moment since the play-through began, which means its History continues to grow and consume more memory as the play-through progresses.

3 Likes

Very good to know about macro for links. I had no idea. I’m very new to this all and my game leans heavily on my writing. I’m learning all the rest as I go :slightly_smiling_face:

thanks!

Well, Twine editor 2.4.0 is coming “soon”, so hopefully that should resolve the issues with the editor slowing down as the game gets huge that Greyelf mentioned.

As for the compiled game getting slow, you might want to check out the comments in the “Any tips on optimization?” thread. You might also want to check out the “FlagBit code” section of my Twine/SugarCube sample code collection. That section is somewhat based on the “bitwise operators” part I mentioned there.

Hope that helps! :slight_smile:

3 Likes