Interactive Fiction

Turning stories into “Choose your own adventures”

This page is to support you with attempting to implement “Interactive Fiction” in an English classroom.

Further discussion of the concept of Interactive Fiction with Generative AI can be found here.


1. Prompt Template (Text only)

1. Student begins by pasting this template into a Generative AI chatbot: (ChatGPT currently work best: Feb, 2024)

“Transform the provided narrative into an interactive ‘Choose Your Own Adventure’ format. Begin by setting the scene using elements from the narrative. After establishing the initial scene, present a singular A/B decision point. Ensure that you wait for my choice (A or B) before revealing the next section. If my choice aligns with the original narrative, continue. If it deviates, create a twist. Continue this step-by-step approach, ensuring that only one decision point is introduced at a time. If I deviate too far from the original narrative, end the story creatively. If I reach the end of the original narrative, let me know I have successfully finished the story. The aim is to keep me engaged while allowing me some autonomy to dictate the direction within the constraints of the original story.”

2. Student then pastes their narrative underneath the prompt template. This should begin the interactive fiction using the student’s original plot, setting and characters.


2. Prompt Template (Text & Illustrations)

This currently only works in ChatGPT Plus (paid version). It has the ability to integrate images with text AND has large enough context window to accept a 1000 word narrative (Feb, 2024).

Use the same procedure as above with this template:

“Transform the provided narrative into an interactive ‘Choose Your Own Adventure’ format. Begin by setting the scene using elements from the narrative. After establishing the initial scene, present a singular A/B decision point. Ensure that you wait for my choice (A or B) before revealing the next section. For each decision point, display an image depicting the scene described in the text. If my choice aligns with the original narrative, continue. If it deviates, create a twist. Continue this step-by-step approach, ensuring that only one decision point is introduced at a time. If I deviate too far from the original narrative, end the story creatively. If I reach the end of the original narrative, let me know I have successfully finished the story. The aim is to keep me engaged while allowing me some autonomy to dictate the direction within the constraints of the original story.


Discussion of elements of the prompt

This table explains some of the reasoning behind the “prompt crafting”. There is nothing magic about it. Once you have the basic concept of Interactive Fiction, various phrasing will give a similar result.

ElementDiscussion
“Transform the provided narrative into an interactive ‘Choose Your Own Adventure’ format.”This helps the Generative AI to expect a completed narrative after the prompt.

It generally understands the genre of ‘Choose Your Own Adventure’.
“Begin by setting the scene using elements from the narrative.” Important to focus the interactive fiction on the specific details of the provided narrative. Without explicit instructions, it can unnecessarily hallucinate details not in the original story.
“After establishing the initial scene, present a singular A/B decision point.” This ensures that only one question is asked at a time. This helps it feel more interactive as each decision influences the journey of the story.
“If my choice aligns with the original narrative, continue. If it deviates, create a twist. Continue this step-by-step approach, ensuring that only one decision point is introduced at a time. If I reach the end of the original narrative, let me know I have successfully finished the story.”This seems to keep the story on track so the student feels their story is being portrayed with fidelity. However, ChatGPT3.5 can still easily get off track.
“The aim is to keep me engaged while allowing me some autonomy to dictate the direction within the constraints of the original story.”Clarifies the purpose of the activity.

I find when using multilayered prompts, a summary sentence specifying the purpose of a request gives more effective outcomes.

Narrative Example

Feel free to use this narrative as an example when trialing Interactive Fiction:

A space shuttle emergency

A shockwave thudded through the ship. A siren sounded suddenly. Peter quickly glanced at the monitor. Red lights flashed on the giant array of computers. His eyes widened. The craft had stopped moving. But this shouldn’t be happening, he thought. NASA MarsTravel space shuttles were designed so nothing could go wrong. It had never happened on any other exploration trip to Mars before. Why, why on mine? Peter Krigzis had trained for months and done so many test runs. “Why couldn’t I stop this from happening?” Peter said to himself. The spaceship was now floating in space, halfway between Earth and Mars.

After closer examination and diagnostic tests, Peter located the problem. The fuel lead. It had been hit by a very small piece of space junk, but it had been travelling hard enough to puncture it. The communications antenna too. He would have to somehow solve the problem alone, for there was no one else to help him. But how? All the fuel had leaked out of the tank. But there was one shred of hope. A secondary fuel tank was in storage. He put on his spacesuit in the airlock with tools to patch the fuel lead. He had done this so many times in training. Then after depressurizing the airlock, stepped out into the vastness of space. He flew his jetpack from there to the pipe. It patched easily, and Peter mended the antenna, too.

But as he shot away, the jetpack cut out, away from the ship. Peter reached for the safety guideline, and realised it was not there. He had done it so many times in training, but the one time it mattered, he forgot. This was not like him. It must have been the stress of the situation getting to his head. He felt panic rising and struggled to slow his breathing that he knew was using extra, precious oxygen. Agonising centimetres away from the ship with his arm outstretched, Peter couldn’t quite reach. He stretched out his leg, and just managed to get his foot under a handhold. With all of his strength, Peter pulled himself in towards the ship. You can do it, he thought to himself. His hand grabbed another handhold, and slowly he began to climb back towards the airlock door. He bent over to crawl through the small airlock door, and got back inside! Woosh! The door sealed shut after him. As the airlock repressurised, Peter allowed himself a momentary sigh of relief.

But the problems weren’t over yet. Suddenly, the seriousness of how close to being out in space, forever, crashed down on him like a stack of weights. He was brought back to his senses, and flinging off his suit, he moved as fast as zero gravity allowed him, to the engine bay and storage section. But his foot kicked something as he exited the control room. Jeff. He had escaped Peter’s thoughts with all the stress. Jeffrey Piacteur had been the other crewmember on the spacecraft. He had suffered a sudden heart attack upon exiting Earth’s atmosphere. Peter had been sad, of course (and still was), for he had trained with Jeff for several months leading up to this voyage. Peter decided not to tell mission control on Earth, fearing that they would abort the mission and he might not be given another chance to do this. Peter’s selfishness had slipped into his thoughts and had overcome his logic, so he had planned to tell Earth on the way back, pretending it had only just happened. But with all the trouble he had completely forgotten about it. He felt a momentary flash of guilt. Regaining his composure, he continued to the engine bay.

Peter found the backup fuel tank. But the old tank would not budge. He felt the monstrous stress build up again, so quickly. Taking a second to breathe, he noticed something that he had overlooked in training. The tanks were bolted to the frame. Of course they would be, thought Peter. All the stress had clouded his mind and made him unable to think rationally. He had to get back to the airlock, where he had left the toolbox. As Peter headed back (making sure not to hit Jeff), he heard a sound. A faint crackle, barely audible. “The radio!” Peter exclaimed. “I completely forgot.” The repairs he had done outside the ship clearly had helped. He turned the volume up and set it to the correct channel. As he did this, he reconsidered his earlier plan to wait to tell NASA mission control about Jeff. He made his decision. The radio was audible now. “crr…crr…crr…come in Mars 17, do you read us? This is mission control. Do you read us? Over…come in Mars 17…”