0 votes
by (120 points)


I'm self-taught with all things code related so apologies in advance.

Last year, I wanted to make a single-passage game – less of a game and more of an exercise. Imagine a paragraph of text where almost every adjective and noun changes when you mouseover it – a chaotic madlibs. I set about doing this, making each word simultaneously an array and a named hook that on mouseover displays a passage that rotates the array.

I essentially completed this to work the way I wanted, and that game is the first link here, Harlowe 1.2.4:


WARNING – it's a little raunchy / lewd / NSFW... not overly explicit, but just FYI.

Like I said, it works how I want. However, I had to make a passage for each word, and do a lot of copy-pasting, which felt ugly to me, and made it impractical to expand on.

Recently I got back into twine, and I had the idea to rewrite this game, but with just two passages instead of 30... by making an all-purpose "rotate" passage that would take a string indicating the name of the array it should rotate.

I got this to work too, and that proof of concept is the second link here, Harlowe 2.1...


But... for some reason, the game slows way down after a couple rounds of mouseovering, lagging until it's almost unresponsive. My first version of the game had no slowdown issues. From peeking at the debug, I get that consantly calling the displayed passage is dumping a lot of text in this game, but I didn't think that this would be a problem.

Please advise! Thanks so much for your time.

Please log in or register to answer this question.